Atlanta Custom Software Development 

   Search        Code/Page

User Login



Forgot the Password?
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
VB VB (1648) (736)
C# C# (15) (779)
ASP ASP (41)
VC++ VC++ (25)
JScript JScript (5)
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
» (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» (4)
» VC (3)
» HTML/CSS/JavaScript (10)
» Regular Expr Tester
» Free Tools

(Page 1 of 6) 171 Result(s) found 


Extract records by their record number
Total Hit (2939) 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 contains 10 ....Read More
Avoid error 1540 in Join queries
Total Hit (2790) When you plan your queries, you should avoid the use of wildcard keyword * - which means "retrieve any field" - mainly because it may decrease performances, since the engine allocates space for the entire row; use explicit field declaration instead, such as: SELECT field1, field2 FROM table1 ....Read More
Create temporary or regular table with SELECT INTO
Total Hit (3166) The SELECT INTO statement is a combination of the SELECT and INSERT T-SQL commands, that lets you create a new table from a subset of the rows and/or the columns of another table. The target table of this command is often a temporary table: «Code LangId=6» SELECT au_fname, au_lname INTO #authors ....Read More
GROUP BY and UNION may return unsorted resultsets
Total Hit (3173) In SQL Server 6.5 and previous versions, the GROUP BY clause in a SELECT statement was carried out by temporarily sorting the resultset before grouping similar rows, therefore the end result was always sorted. For this reasons, many programmers omitted the ORDER BY clause, because the result was sor ....Read More
Null values in WHERE clauses
Total Hit (3164) A SELECT query returns all the rows for which the WHERE clause returns True. However, many developer - especially those accustomed to other programming languages, such as VB - get confused on this point, and assume that the query returns the rows for which the WHERE clause returns any non-False valu ....Read More
Quickly copy records between tables with same structure
Total Hit (2958) The SQL language offers a simple and effective way to quickly move all records from a table to another table with same field structure, that is same fields' name, type and position: «Code LangId=6» INSERT Customers SELECT * FROM New_Customers -- you can optionally complete the move by -- delet ....Read More
Statistic functions that take Null values into account
Total Hit (2850) Statistic functions - that is MAX, MIN, SUM, AVG, VAR, VARP, STDEV and STDEVP - don't take Null values into account. Usually this isn't a problem with the SUM function, but it can be an issue with the others. For example, you can evaluate the average value of a group of records keeping Null values i ....Read More
The ALL clause can speed up UNION statements
Total Hit (2833) If you omit the ALL clause in an UNION statement, SQL Server must delete duplicate values, which in turn means that it has to sort the two sub-resultsets that have to be combined. Needless to say, this is a time-consuming operation. In most cases, you decide whether to use the ALL clause dependin ....Read More
The fastest way to delete all the rows in a table
Total Hit (2822) The standard way to delete all the rows in a SQL Server table is a DELETE statement without a WHERE clause: «Code LangId=6» DELETE FROM MyTable «/Code» However, in most cases you can speed up your code remarkably with the TRUNCATE TABLE command: «Code LangId=6» TRUNCATE TABLE MyTable «/Code ....Read More
Understanding the TOP WITH TIES clause in SELECT queries
Total Hit (3045) The SELECT TOP N query always return exactly N records, and arbitrarily drops any record that have the same value as the last record in the group. To see what this means in practice, execute the following query against the Pubs database in SQL Server 7.0: «Code LangId=6» SELECT TOP 5 price, titl ....Read More
Update SQL Server database with Updategrams
Total Hit (2653) 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 informati ....Read More
Compare datetime variables only to check date
Total Hit (3712)
Displaying random data from SQL table
Total Hit (2797) Following query will display any 5 random rows from Products table of Northwind database NewId() function genereates New GUID.......Try this code it works fine «Code LangId=6» select top 5 * from products order by NewId() «/Code»
Working with COM objects from within T-SQL
Total Hit (4631) This article includes - Introduction - General concepts - OLE Automation Stored Procedures «OL»«LI»sp_OACreate «LI»sp_OADestroy «LI»sp_OAGetProperty «LI»sp_OASetProperty «LI»sp_OAMethod «LI»sp_OAGetErrorInfo «LI»sp_OAStop«/OL» - Example: generate script - Literature ------ ....Read More
OLE Automation in SQL server
Total Hit (3575) This is an example of a Transact-SQL statement batch that uses the OLE Automation stored procedures to create and use an SQL-DMO SQLServer object. Portions of the code are used as examples in the stored procedure references. DECLARE @object int DECLARE @hr int DECLARE @property varchar(255) DE ....Read More
Some Useful Undocumented SQL Server 7.0 and 2000 DBCC Commands
Total Hit (3028) Introduction Undocumented DBCC commands: DBCC BUFFER DBCC BYTES DBCC DBINFO DBCC DBTABLE DBCC DES DBCC HELP DBCC IND DBCC LOG DBCC PAGE DBCC PROCBUF DBCC PRTIPAGE DBCC PSS DBCC RESOURCE DBCC TAB Literature -------------------------------------------------------- ....Read More
select only date or time part of a datetime value
Total Hit (2664)
How to count the number of lines in an external OS file? Will work for ASCII files only.
Total Hit (3295)
How to find the number of days in a month?
Total Hit (2509)
This is the solution to the February Reader's Challenge in the SQL Server Magazine.
Total Hit (2588)
This is the solution to the February Reader's Challenge in the SQL Server Magazine.
Total Hit (2476)
How to store different datatypes in a column & extract them
Total Hit (2607)
How to get the maximum date value in a group or NULL if present?
Total Hit (2865)
How to get monday date given any date? This will work with the default SQL Server DATEFIRST setting & similar logic can be used to determine SUNDAY date etc.
Total Hit (2538)
How to copy text values from one table to another? This one demonstrates for a text value in a single row.
Total Hit (2560)
How to calculate AGE in years? The DATEDIFF function in MS SQL Server gives the distance between year boundaries & as such cannot be used to calculate the age.
Total Hit (2848)
How to get identity kind of values for each row in a query? This technique demonstrates how to use CROSS JOIN, sub-query for counting & does not use temporary tables.
Total Hit (2388)
How to format int or decimal values with commas?
Total Hit (2734)
How to print only the first value in a group of duplicates?
Total Hit (2260)
How to retrieve individual octets from an IP address?
Total Hit (2338)

(Page 1 of 6) 171 Result(s) found  1 2 3 4 5 6

Recommanded Links


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.