Login | Register   
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 388     Previous     Next
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 ...
Use 'open' Date in the Oracle SQL Where Clause
by Lev Romanov
The most common example where 'open' date is used is in the expiration_date for an entry. It could be set for a particular date, or be NULL if the expiration date isn't defined (open date). It is ...
Customizing Column Name and Width
by Ashu Verma
SQL*Plus uses column names as default column headings while displaying query results. You can customize your own column heading and width with the help of following commands. ...
The Difference between 'Count' and 'Count(*)'
by Mahyar Ghasemali
'Count': Counts the number of non-null values.
Using ROWNUM To Retrieve
by Lev Romanov
It is often necessary to get a list of values from multiple rows. Generally, this is done using the cursor, which tends to make the task more complicated.
41-60 of 388     Previous     Next
Sitemap