Archive

Posts Tagged ‘SQL’

Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & . NET

April 28th, 2010 5 comments

Product Description
Create and Use Stored Procedures for Optimal Database PerformanceDevelop complex stored procedures to retrieve, manipulate, update, and delete data. Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & . NET identifies and describes the key concepts, techniques, and best practices you need to master in order to take full advantage of stored procedures using SQL Server’s native Transact-SQL and . NET CLR languages. You’ll learn to incorporate effective Transact-SQL stored procedures into client or middleware code, and produce CLR methods that will be compiled into CLR stored procedures. This is a must-have resource for all SQL Server 2005 developers. Essential Skills for Database ProfessionalsGroup and execute T-SQL statements using batches, scripts, and transactionsCreate user-defined, system, extended, temporary, global temporary, and remote stored procedures Develop and manage stored procedures using C# and Visual Basic . NETIm. . . More >>

Microsoft SQL Server 2005 Stored Procedure Programming in T-SQL & . NET

SQL Server 2005 Video Tutorial – 1 – Installing

April 22nd, 2010 25 comments


idealprogrammer.com presents SQL Server 2005 Video Tutorial Series. In this first 10-minute video, you will learn how to install SQL Server 2005 Express and the SQL Server Management Studio.

T-SQL 2008 Joes 2 Pros: Core T-SQL Coding Fundamentals For Microsoft SQL Server 2008

April 22nd, 2010 5 comments

Product Description
Joes 2 Pros turns SQL students into SQL certified experts. This is the original SQL book that began it all. A newer second edition of this book has been reprinted with a lower price under the new title, “Beginning SQL Joes 2 Pros”. It has the same images, explanations, practices, and quizzes as before, as well as great new additions suggested by readers. Just as every computer expert in the world today knew nothing about computers when they started out, you too can evolve from Joe 2 Pro by taking the steps outlined in these books. Over several years, students have given feedback on what has helped them learn & achieve success. These new labs are a direct result of this positive feedback. . . . More >>

T-SQL 2008 Joes 2 Pros: Core T-SQL Coding Fundamentals For Microsoft SQL Server 2008

SQL SERVER / T-SQL Tutorial: Left Outer Join – Right Outer Join – Full Join – Combining Join

April 21st, 2010 2 comments


T-SQL Tutorial

SQL SERVER Tutorial – T-SQL: TOP – CROSS JOIN – JOIN WITH WHERE – INNER JOIN – MULTIPLE JOIN

April 20th, 2010 2 comments


T-SQL Tutorial

Pro T-SQL 2005 Programmer’s Guide

April 18th, 2010 5 comments

Product Description
Pro T-SQL 2005 Programmer’s Guide provides comprehensive and detailed coverage of all the major features and facilities of T-SQL for SQL Server 2005. It is designed for all users of T-SQL, database administrators, systems administrators, application developers, and end-users, who want to learn how to exploit the power of T-SQL. Whatever you need to do with T-SQL, you’ll find it described clearly here. Stored procedures, triggers, and user-defined functions are on… More >>

Pro T-SQL 2005 Programmer’s Guide

Automating tests for T-SQL code

April 16th, 2010 1 comment


tst.codeplex.com

This is a short demo of the TST tool. This is an open source tool that can be used to write and automate tests for T-SQL code. Similar to other tools like SPUnit but with a more mature set of features. Can be downloaded from http

How do I get started in writing/programming in T-SQL?

April 9th, 2010 2 comments

I am completely confused on what T-SQL really is and how it is different from SQL and its variants.

How do you guys program something using T-SQL language?
I mean where do you actually ‘encode’ those T-SQL codes?
In cobol I use notepad as the programming environment.

Do I need to download something like that of a C++ compiler?

Powered by Y! Answers

How do I set up a job on SQL 2000 to back up a database on other computers in my domain to my computer?

April 4th, 2010 1 comment

I am trying to create a job on SQL 2000 that will allow me to backup databases from 3 other computers in my domain. all running SQL 2000. i need help writing the T-SQL Statement to insert in the job step.
Powered by Y! Answers

PL/SQL Best Practices with Steven Feuerstein

April 1st, 2010 13 comments


Renowned Oracle PL/SQL expert, Steven Feuerstein, presents “PL/SQL Best Practices” — offering high-level principles to guide our work.

T-SQL: How do I find the greatest values in a column?

March 31st, 2010 3 comments

How can write a SELECT statement that finds the n greatest values in a column? From what i’ve read, the TOP statement only returns the first n rows, it doesn’t take any regard to the values. For example, if a have a column with ages, i want to be able to find the 5 oldest people.

Oracle Database 11g PL/SQL Programming

March 30th, 2010 5 comments

Product Description
Design Feature-Rich PL/SQL ApplicationsDeliver dynamic, client/server PL/SQL applications with expert guidance from an Oracle programming professional. With full coverage of the latest features and tools, Oracle Database 11g PL/SQL Programming lays out each topic alongside detailed explanations, cut-and-paste syntax examples, and real-world case studies. Access and modify database information, construct powerful PL/SQL statements, execute effective … More >>

Oracle Database 11g PL/SQL Programming

Valid styles for converting datetime to string

February 26th, 2010 No comments

I wrote this little table and procedure to help me remember what style 104 did, or how to get HH:MM AM/PM out of a DATETIME column. Basically, it populates a table with the valid style numbers, then loops through those, and produces the result (and the syntax for producing that result) for each style, given the current date and time.

It uses also a cursor. This is designed to be a helper function, not something you would use as part of a production environment, so I don’t think the performance implications should be a big concern.

Read more…

Categories: SQL Tags: CONVERT, DateTime, MS SQL Server, SQL, T-SQL

Use CAST (or CONVERT) to handle Null Date values in Microsoft SQL Server

February 26th, 2010 No comments

In an SQL Server View, a problem is that the DateTime field has many Null values which is causing a problem with the parsing of the data in MSAccess.

How to I use CAST (or CONVERT) to handle Null Date values in my SQL Server view?

There is a way to use CAST or CONVERT similar to the nz type function in MSAccess to handle null date values but I can’t remember the syntax.

What is happening now is that I get a data mismatch in my MSAccess function when it hits a Null Date value. Can I somehow use the ISNULL or ISDate function? I believe I need to somehow return “” instead of Null.

Read more…

Categories: SQL Tags: CAST, CONVERT, DateTime, MS SQL Server, SQL

MS SQL Server / SELECT clause with a CASE expression

February 26th, 2010 No comments

In SQL Server, if you have a column which has NULLs and instead of nulls, if you want to display ‘Nothing’, what would you do?

The following query

SELECT CASE Dept_Name WHEN NULL THEN 'Nothing' ELSE Dept_Name END Dept_Name
FROM Inventory

would still display the nulls and not ‘Nothing’.

Workaround:

Read more…

SQL SELECT INTO Statement

January 3rd, 2010 No comments
The SQL SELECT INTO statement can be used to create backup copies of tables.

The SQL SELECT INTO Statement

The SELECT INTO statement selects data from one table, creates a new table with the exact structure and size and inserts automatically the selected data into the new table.

SQL SELECT INTO Syntax

We can select all columns into the new table:

SELECT *
INTO new_table_name [IN externaldatabase]
FROM old_tablename

Or we can select only the columns we want into the new table:

SELECT column_name(s)
INTO new_table_name [IN externaldatabase]
FROM old_tablename

Read more…