Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

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

Transact-sql - Page 3

41-60 of 393     Previous     Next
Locate the Installed Version of MS SQL Server
by Jaya Nehru Kumar
Use this query to determine what version, Service Packs, and editions of MS SQL Server are installed on a given machine.
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 ...
41-60 of 393     Previous     Next
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date