Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Database Development > SQL > Transact-sql

Transact-sql - Page 3

41-60 of 392     Previous     Next
Manipulate Stored Procedure Resultsets as If They Were Simple Queries
by Parthasarathy Mandayam
Find out how to replace a simple SELECT with a stored procedure without losing direct control over the resultset.
Getting the Week Start Date and Week End Date in SQL
by Raj Chidipudi
Suppose you're given a date and asked to retrieve data for the whole week in which the given date falls. The example code in this tip produces the Week Start Date and Week End Date.
Start MS-SQL Server Jobs from the Query Analyzer
by Somaiah Manukonda
This code shows you how to start a job from the Query Analyzer.
Get Separate Records for the Comma Delimited Values of One Field (TSQL)
by K.Nageswara Rao
Get the Average Value Across the Columns by Using the AVG() Function
by K.Nageswara Rao
Sorting SQL Results in Your Own Preferred Order
by Kapil Srivastava
Sequence a Number Field Without an Identity Column
by K.Nageswara Rao
Get the Maximum Value Across Columns in TSQL
by Harinatha Reddy
Boolean Operations Between Bit Variables in SQL
by Daniel Nagdimunov
Calculate the product of a field
by Francesco Balena
The SQL language includes the SUM() aggregate function, that evaluates the sum of all the values in a given column, but it doesn't include a PROD() function that evaluates the product of those values. While this function is surely less commonly useful than SUM(), there are cases when you'd like ...
Most runtime errors don't rollback transaction
by Francesco Balena
Many developers mistakenly believe that any error inside a transaction will make the transaction fail and automatically rollback. However, this is true only for fatal errors, such as most errors with severity equal to 16 or higher. The commonest runtime error - for example duplicate ...
Retreive information about SQL Server
by Francesco Balena
You may retrieve a few important information about a connection to SQL Server by querying the server through appropriate @@ global variables. For example, the following routine takes an ADO Connection object that points to SQL Server and prints a few information about the connection:
Swap the values of two columns
by Francesco Balena
At times you may need to swap the values of two columns of the same SQL Server table. For example, suppose that you realized that the fname column of the Employee table contains the last name of each employee, and vice versa. Typically you do this from VB using a writeable cursor-based ...
The WITH CHECK OPTION option with views
by Francesco Balena
SQL Server's views are updateable, but it is possible that when you insert a new record or update an existing record, the record added or modified doesn't logical belog to the view any longer. For example, consider the following view: CREATE VIEW authors_CA AS ( ...
Update SQL Server records via HTTP
by Giuseppe Dimauro
Thanks to the SQL Server extensions for the Web and XML, it is now possible to query a SQL Server database (and get the result as XML) as well as insert, update, and delete records in a database. In this tip I'll show a few examples of this technique. Here's a first example that shows how you ...
Update SQL Server database with Updategrams
by Giuseppe Dimauro
You can use XML to transfer both data and commands. In this column I'll show how you can update a database by means of XML commands sent over the HTTP protocol and, even more interesting, how to perform bulk uploads with these commands. An updategram is a piece of XML data that contains ...
Return Strings From an API
by Bill McCarthy
In .NET, strings are immutable: When you pass them out to an API, you can
Eliminate All Database Connection Logic from ASP
by Joe Baker
Eliminate any database connection logic from your ASP pages by implementing a simple VB component that wraps up the most common ADO functionalities and in conjunction with a UDL.
Print the Length of the String Without Using strlen()
by Rajani Kanth
The following code reads one string, and prints the length of that without using ...
Check for OS File Existence from T-SQL
by Harinatha Reddy
Sometimes you may want to check whether a particular file is available while working with the file system in T-SQL. You can check this by using "xp_fileexist ", Sql Server Undocumented system ...
41-60 of 392     Previous     Next
Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date