Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

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

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

Changing columns to rows.
Total Hit (1508) Another example that shows how to convert columnar values into individual rows.
Rating
How to calculate the statistical mode of a set of values using a SELECT statement?
Total Hit (2788)
Rating
How to transfer BLOB fields like text/image from one server to another in SQL60/65? The same can be done in SQL70 using distributed queries.
Total Hit (2375)
Rating
How to perform case-sensitive search on strings in a case-insensitive server?
Total Hit (1524)
Rating
How to strip money values from a specifically formatted string: "n...-X..."? n... indicates the money value with varying lengths & decimal points also. X... indicates the alpha-numeric string after the money value
Total Hit (1511)
Rating
How to add time values formatted as hh:mm & display as hh:mm?
Total Hit (1499)
Rating
How to perform array-like manipulations using the set-oriented SQL features.
Total Hit (1516)
Rating
Here is a sample SP that shows how to manipulate text / image data. For simple insert / update of BLOB data, the INSERT / UPDATE statement will suffice. UPDATETEXT or WRITETEXT statements are required when modification of existing data needs to be done.
Total Hit (2318)
Rating
This is an example that shows how to do the opposite of pivot.
Total Hit (1500)
Rating
This is a simple routine that shows how to combine several binary values into a single image value. This is similar to string concatenation & this example just adds the bytes together as a stream.
Total Hit (2340)
Rating
Methods to form complex strings for dynamic SQL execution
Total Hit (1590) This T-SQL script shows several techniques to form complex dynamic SQL strings. These eliminate to some extent the coding involved in concatenating string values and making sure to add single quotes appropriately between values. The methods discussed can make the code simpler to read & is less error ....Read More
Rating
Tricks using a numbers table
Total Hit (1646) Solving most problems using a relational technique is more elegant and better in terms of performance. This script shows few examples that uses a Numbers table to solve some common problems. Keep a table with Numbers & it will prove very handy.
Rating
Concat several address fields together (example)
Total Hit (2274) Concatenating several column values as a comma-separated string is a often encountered scenario. This method shows one way to do this using COALESCE function.
Rating
Example for encrypting data using XOR
Total Hit (1942) Functions to encrypt data in columns are not available in SQL Server (except undocumented ones that are risky to use & not supported). Here is one that shows how to do this using XOR. «code LangId=6»DECLARE @pwd varchar(30) , @encryptkey int , @encryptedpwd varchar(30) , @charpos smallint; SELE ....Read More
Rating
Check a string for numeric digits only
Total Hit (1852) The ISNUMERIC function in SQL60/65/70 checks for decimal & integer values. Hence characters like D, E are valid float representations & similarly ','. This is a simple logic that can check only for numeric digits without using a loop of any kind.
Rating
Delete all but the two latest messages for each user
Total Hit (1455) Here is one example of a correlated query. This example uses a table that contains messages for each user. This can be used to delete all but the 2 latest messages.
Rating
Strip the tags out of a HTML string
Total Hit (1367) A relational technique to strip the HTML tags out of a string. This solution demonstrates how to use simple tables & search functions effectively in SQL Server to solve procedural / iterative problems.
Rating
Counting ocurrences of a pattern in text data
Total Hit (1472) A sample script to count the number of occurrences of a particular string pattern in a text column. This demonstrates how to use PATINDEX with simple SELECT statements.
Rating
Dissecting datetime value storage to individual dateparts.
Total Hit (1691) Ever wondered how SQL Server stores the datetime value in 8 bytes. Well, this code shows how to decode the values using simple mathematical operations.
Rating
File details using NT commands & undocumented SP.
Total Hit (2353) Getting file details is easy using the undocumented extended SP 'xp_getfiledetails'. But you can't rely on this to be the same between versions of SQL Server or even service packs. So here is an alternative method using the standard NT commands. The undocumented SP is also shown for completeness. ....Read More
Rating
Sorting only based on the numeric digits in a column containing alpha-numeric values of the form nnnXXX.
Total Hit (1891) An example for using a CASE expression in an ORDER BY clause. This solution solves the problem of sorting based on the numeric values in a column. The column contains strings of the format 'nnnXXXX' where 'n' represents a numeric digit & 'X' represents any non-numeric character. ....Read More
Rating
Finding gaps in sequential numbers.
Total Hit (2878) A simple JOIN that will determine gaps in a set of sequential values. This query will basically give the sequence number after which a gap is present.
Rating
Dynamic execution of SP ( This method is not well-known ).
Total Hit (2540) This method of dynamic SQL execution is not well-known. This will work from SQL60 & upwards. This is very useful when calling SPs dynamically with parameters of different datatypes, output parameters & return value.
Rating
Get only one matching row for each name from several address rows.
Total Hit (1513) This is the fastest way to get say only one matching address row for each person out of a set of duplicates. This logic assumes that you do not care which address row you want to display. It can be easily extended to include other checks say based on the last added address row etc. ....Read More
Rating
Sample for how to send progress info from long running sps.
Total Hit (1882) Some sample code that shows how to return progress info from long running SPs. This is useful for reporting purposes or to include other mechanisms to control the SP execution.
Rating
Maximum Value from 5 columns.
Total Hit (1461) This script shows how to obtain the maximum value of 5 columns. It is possible to do this using CASE statement but the expression gets quite lengthy. This shows an easy way to use the MAX function itself & this approach can be extended to as many columns as you want. ....Read More
Rating
Number of days between a given date & 3rd sunday of current month.
Total Hit (1476) This T-SQL script shows how to calculate the number of days between a given date and the 3rd sunday of the current month. This can be easily modified to accomodate count till 3rd saturday or 3rd monday of current month & so on.
Rating
A tricky ordering problem.
Total Hit (1800) This is 2 of the solutions to an ORDER BY problem posed in the microsoft.sqlserver.programming newsgroups. This demonstrates several powerful derived table techniques.
Rating
Stripping individual values from a comma-separated string using SELECT statement only.
Total Hit (2402) SELECT statement that demonstrate how to strip individual values from a comma-separated string. This uses a table of Numbers to solve the procedural problem.
Rating
Generic logic to search & replace characters in a string.
Total Hit (1570) A generic logic to search & replace certain characters in a string. This approach is flexible in the sense that new characters can be added for searching without modifying the logic. This will make the code more maintainable too.
Rating


(Page 93 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

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

© 2008 BinaryWorld LLC. All rights reserved.