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

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

 

Concat several address fields together (example)
Total Hit (2235) 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 (1841) 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 (1809) 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 (1410) 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 (1322) 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 (1437) 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 (1647) 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 (2292) 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 (1847) 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 (2826) 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 (2466) 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 (1464) 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 (1842) 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 (1416) 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 (1440) 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 (1749) 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 (2355) 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 (1519) 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
Changing columns to rows.
Total Hit (1469) 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 (2746)
Rating
Generate sequence numbers within a group of values.
Total Hit (1467) This example shows how to generate sequence numbers within a group of values in a SELECT statement. With proper indexes & search conditions, the example using the SELECT statement with GROUP BY will be very efficient.
Rating
Wrong usage of UPDATE FROM clause.
Total Hit (1523) This script demonstrates the wrong usage of UPDATE statement with a FROM clause esp. in case of a table with 1-to-many relationship with another tables(s).
Rating
How to order rows from a query in random order? This method should be used with caution & only after testing.
Total Hit (1548)
Rating
Flight Schedule Ordering problem.
Total Hit (1697) A flight schedule ordering problem. This demonstrates the powerful derived table feature. More details regarding the problem is in the link.
Rating
Generate combinations of data from columns.
Total Hit (2189) How can you generate various combinations of data from existing columns? This method shows one approach using the CUBE operator with the SELECT statement.
Rating
How to generate duplicates of existing rows based on the count value in a column?
Total Hit (1485)
Rating
Yet another pivot table example
Total Hit (1580)
Rating
Another pivot table example
Total Hit (3436)
Rating
How to calculate the previous & current salaries for each employees from rows that contain the start & end date for each salary?
Total Hit (1442)
Rating
How to convert integer values to hexadecimal strings in SELECT statement or computations or expressions in WHERE clause etc?
Total Hit (1409)
Rating


(Page 3 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.