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

Sql Server - Page 4

61-80 of 728     Previous     Next
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 ...
How to improve performance with pinned tables
by Giuseppe Dimauro
SQL Server experts know that the DB engine never accesses directly the data pages on disk; rather it uses a special module called "Cache Manager". It is possible, by using some T-SQL commands, to force the selected tables to stay in the buffer for a longer time. This technique increases the ...
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 ...
Department Wise Employee Ranking With Single T-SQL Query
by Srinivas Reddy
This code will retrieve the employee details with a salary-wise ranking from each dept.EMP table with different departments and different salaries. If two employees in the same department have ...
Conditional Sorting in T-SQL
by Harinatha Reddy
There may be certain situations where you have to sort character-based columns in a particular order.
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. ...
Extract records by their record number
by Francesco Balena
SQL Server, and the SQL language in general, doesn't support record numbers, so you can't extract a set of records if you know their position in the resultset. This missing capability would be extremely convenient when displaying pages of data in an ASP program. For example, if each page ...
Storing SQL Server Data in Various Linguistic Formats
by Jorge Silva
One of the problems that Web developers face today is: 'How can I store the usernames of my visitors in a SQL Server database if each language has it's own characteristics?'. Well, most of us ...
Convert an Exception StackTrace to a String
by Kesav Kumar
This feature will be required if you want to store exceptions in a ...
Improve I/O throughput of intelligent subsystems to favor SQL Server
by Giuseppe Dimauro
One of the peculiar features of Microsoft SQL Server is its capability to keep alive multiple threads at the same time for performing I/O operations. The configuration options that affects how many threads available for these operations is max async IO. The default value for this option ...
61-80 of 728     Previous     Next
Sitemap