Skip to main content

List of my SQL Articles / Tips ...

Last Updated on October 10, 2007

* Latest articles are added at the end of this post.

Articles relating to SQL Server 7.0 / 2000

1. [MSDN] Database documentation
2. Returning comma seperated details from a table ...
3. Quick search within ALL stored procedures ...
4. Find whether a column is identiy or not
5. Encryption in SQL Server 7.0
6. About sp_readerrorlog
7. Useful TSQL code snippets for beginners
8. Copying database diagrams ...
9. Query to display Null values at the bottom ...
10. Alternate rows ...
11. Running number !!
12. Doing case sensitive searches
13. Easiest way to add comments to your SQL 2k code ...
14. Listing records from 10 to 15 (for ex) without using where clause
15. Is sorting possible in Views?
16. Creating thumbnails from binary content
17. Saving an image as binary data into SQL Server
18. Reclaim Unused Table Space
19. Encrypting ALL SP's ...
20. Database Compatibility ...
21. About TimeStamp datatype of SQL Server ...
22. Grouping Stored Procedures
23. Creating SQL Based RSS Feed
24. About TSEqual function (SQL 2K)
25. Text functions in SQK 2k
26. Avoid using sp_rename ...
27. Delete Vs Truncate Statement
28. UDF's in Constraints ...
29. Registry manipulation from SQL
30. Comparing tables ...
31. Sp_refreshView explained ...
32. Recursive function to display hierarchial data ...
33. Primary keys without Clustered Index ...
34. Sorting decimal values within a varchar field
35. SPLIT function in SQL Server -- Method 1
36. SPLIT function in SQL Server -- Method 2
37. Padding Leading Zero's
38. Finding product of a column

39. Relation between Triggers and sp_dbcmptlevel
40. Faster way to fetch row count of a table
(Solution for SQL 2005 is also added)
41. Easiest / fastest way to Delete ALL records in a [development] Database (Works in SQL 2005 as well)
42. How to find whether a decimal number is divisible by another decimal number?
43. Find out the second (2nd) highest salary from employee table.
44. Rolling back a truncate operation!
45. Fun with SQL Server

46. Rolling back a truncate Operation
47. Sp_executesql() vs Execute() [both SQL 2k and 2005]
48. Don't start user defined SP's with "SP_"
49. Find tables which doesn't have Primary Key [both SQL 2k and 2005]
50. Find number of days in a given month
51. List tables that doesn't participate in any relationships [both SQL 2k and 2005]

52. Removing unwanted spaces within a string ...
53. Workaround for 'Divide by zero error encountered'
54. GRANT permission to ALL stored procedures
55. Query to find out indexes created dynamically by SQL Server 2000

Articles relating to SQL Server 2005

1. Saving images as BLOB into SQL Server 2005
2. Paging records using SQL Server 2005
3. Exposing SQL Server 2005 data via a Web Service
4. Sending custom resultset -- SQL Server 2005
5. SP to rename a directory using CLR in SQL Server 2005
6. Encrypt and decrypt data in SQL Server 2005
7. Basics of DDL Triggers in SQL Server 2005
8. Creating a DML trigger using CLR in SQL Server 2005
9. Simple SP written using CLR in SQL Server 2005
10. Cross Apply and Outer Apply in SQL Server 2005
11. SQL Server 2005 and GO operator ...
12. Sql 2k -- Yukon -- Acadia
13. Try/Catch block in Sql Server 2005
14. Enhancements to Top Keyword in Yukon
15. XML Data type in Yukon
16. About large value data types
17. Creating reports using Pivot operator
18. Row_Number function in Sql Server 2005
19. Viewing the source code of SP in Yukon
20. Memory management in Yukon
21. Copy file from source to destination using CLR in Yukon
22. SP to create directory using CLR in SQL Server 2005
23. Synonyms in SQL Server 2005
24. About use="required" attribute in Yukon
25. Rank function in SQL Server 2005 ...
26. Creating XML Schema in SQL Server 2005
27. XML data type and Quoted Identifier
28.
SQL Server Configuration Manager ...
29.
About 'RESOURCE' database in SQL Server 2005
30.
Paging in SQL Server 2000 and 2005?
31.
Accessing a table in SQL Server 2005 (Schema related)
32. Listing / Dropping ALL SPs from a database in SQL Server 2005
33. Brief Theoretical Knowledge about Table Partitioning
34. Example for Creating and using Partitions in SQL Server 2005
35. Different Types of Partitioning Operations in SQL Server 2005
36. Max limit of Varchar, nvarchar, varbinary datatypes ...
37. Export data from SQL Server to Excel without using SSIS or DTS
38. Arithmetic overflow error converting expression to data type int.
39. Find the missing numbers (GAPS) within a table...
40. How to find out recently run queries in SQL Server 2005?
41. Finding missing indexes in SQL 2005
42. NEWID vs NEWSEQUENTIALID
43. Reclaiming the table space after dropping a column - [with clustered index]
44. Reclaiming the table space after dropping a column - [without clustered index]
45. SQLCMD -- Part I (Basics, Connectivity)
46. SQLCMD -- Part II (Interactive Mode)
47. SQLCMD -- Part III (Non-Interactive Mode)
48. SQLCMD -- Part IV (Set your favorite editor)
49. SQLCMD -- Part V (Setting startup scripts)
50. SQLCMD -- Part VI (Scripting Variables)
51. SQLCMD -- Part VII (Concatenating string with a scripting variable)
52. SQLCMD -- Part VIII (:r and about concatenating string with spaces)

Technorati tags: , , ,

Comments

Tejas said…
That's a impressive list Vadivel. Keep up the good work.
Anonymous said…
This is one of the best set of article I hv ever read. Worth reading, and gives lot of new information. Better approach in many places which I'll apply in my current project. Many thanx to the authour and wish him to write more.
Anonymous said…
Just I had gone through the blog. Everything is highly informative. Looks you spent lot of effort to do this. Keep up the good work vadivel.

Thanks
Rosi Reddy. R
Anonymous said…
If I am not wrong, We can display the null values in end by using the query like this

Select * from sampleTable
Order by FirstName desc

Rosi Reddy
Vadivel said…
Rosy, yes your query is also perfectly fine.

But my query would list numeric value at the top and then the strings and at the bottom NULL values.

Whereas your query would jike that display in the descending order. If you want me to explain with an example do let me know.

Hope this helps!
Anonymous said…
Good Work, Keep going good work.
Anonymous said…
Hi Vadivel ,If possible please tell me how to convert

a Feild [KONP-KBETR] whose value is 1060.00. It should be converted as 106.00.I am unable to do so. Please answer asap
Anonymous said…
Dear Vadivel

can we find by using store procedure colum totaly name is there but in that numeric we entered how to get that case output
its a junk name can u give example
Vadivel said…
I don't think i have understood your query! Can you explain it more clearly?
Buy Articles said…
I find this information very useful and it has considerably saved my time.thanks

Popular posts from this blog

Registry manipulation from SQL

Registry Manupulation from SQL Server is pretty easy. There are 4 extended stored procedure in SQL Server 2000 for the purpose of manupulating the server registry. They are: 1) xp_regwrite 2) xp_regread 3) xp_regdeletekey 4) xp_regdeletevalue Let us see each one of them in detail! About xp_regwrite This extended stored procedure helps us to create data item in the (server’s) registry and we could also create a new key. Usage: We must specify the root key with the @rootkey parameter and an individual key with the @key parameter. Please note that if the key doesn’t exist (without any warnnig) it would be created in the registry. The @value_name parameter designates the data item and the @type the type of the data item. Valid data item types include REG_SZ and REG_DWORD . The last parameter is the @value parameter, which assigns a value to the data item. Let us now see an example which would add a new key called " TestKey ", and a new data item under it called TestKeyValue :

Screen scraping using XmlHttp and Vbscript ...

I wrote a small program for screen scraping any sites using XmlHttp object and VBScript. I know I haven't done any rocket science :) still I thought of sharing the code with you all. XmlHttp -- E x tensible M arkup L anguage H ypertext T ransfer P rotocol An advantage is that - the XmlHttp object queries the server and retrieve the latest information without reloading the page. Source code: < html > < head > < script language ="vbscript"> Dim objXmlHttp Set objXmlHttp = CreateObject("Msxml2.XMLHttp") Function ScreenScrapping() URL == "UR site URL comes here" objXmlHttp.Open "POST", url, False objXmlHttp.onreadystatechange = getref("HandleStateChange") objXmlHttp.Send End Function Function HandleStateChange() If (ObjXmlHttp.readyState = 4) Then msgbox "Screenscrapping completed .." divShowContent.innerHtml = objXmlHttp.responseText End If End Function </ script > < head > < body > &l

Script table as - ALTER TO is greyed out - SQL SERVER

One of my office colleague recently asked me why we are not able to generate ALTER Table script from SSMS. If we right click on the table and choose "Script Table As"  ALTER To option would be disabled or Greyed out. Is it a bug? No it isn't a bug. ALTER To is there to be used for generating modified script of Stored Procedure, Functions, Views, Triggers etc., and NOT for Tables. For generating ALTER Table script there is an work around. Right click on the table, choose "Modify" and enter into the design mode. Make what ever changes you want to make and WITHOUT saving it right click anywhere on the top half of the window (above Column properties) and choose "Generate Change Script". Please be advised that SQL Server would drop actually create a new table with modifications, move the data from the old table into it and then drop the old table. Sounds simple but assume you have a very large table for which you want to do this! Then it woul