SQL Server 2005 has lots of new features, of which one is PIVOT clause. This is similar to Pivot tables in MS Excel and Matrix Control in Reporting Service. Here is a simple example demonstrating how to use PIVOT clause. I am right now taking a simple example. There are scenarios where there could be a need to write a big stored procedure to build a Pivot table in lower versions of SQL Server.
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Injection of HTML code and/or client side scripts like JavaScript, VBScript, and Jscript by malicious web users into the web pages viewed by other users is a computer security vulnerability typically found in web applications. This is popularly known as Cross Site Scripting (XSS) Attack.
[More]
Currently rated 3.0 by 1 people
- Currently 3/5 Stars.
- 1
- 2
- 3
- 4
- 5
Have you ever considered adding documentation to your code instead of maintaining a separate word document as part of your application high level and detailed design? Let me start this series with the basics of generating help documentation and I will describe the different XML tags available for documentation and how we can generate our design documents out of XML comments in later articles of the series.
[More]
Currently rated 4.0 by 1 people
- Currently 4/5 Stars.
- 1
- 2
- 3
- 4
- 5
No doubt that a DTS or SSIS package can be used to export SQL Server table data to a text file. The below article is to demonstrate another way to export SQL Server table data to a text file using xp_cmdshell extended stored procedure (This is with reference to SQL Server 2005 and above).
[More]
Currently rated 4.0 by 1 people
- Currently 4/5 Stars.
- 1
- 2
- 3
- 4
- 5
One of my office mate Ranjan Patra did some research on internet and found a simple and quick solution to have row data as comma separated string.
[More]
Currently rated 4.0 by 1 people
- Currently 4/5 Stars.
- 1
- 2
- 3
- 4
- 5
IN SQL Server, it is easy to select one random record or a sequence of random records from a database table. For example if you have requirement to pick a single quiz winner randomly from the database table or you are making an online test application and need to pick X number of questions randomly from the database table; you can certainly use the below SQL queries…
[More]
Currently rated 4.0 by 2 people
- Currently 4/5 Stars.
- 1
- 2
- 3
- 4
- 5
This is a general problem faced by a maintenance team. While importing or exporting data to or from or between databases, the PK is removed accidentally and the table now has lots of duplicate records. The big question for the support staff is how to clean the database? It's simple...
[More]
Currently rated 5.0 by 2 people
- Currently 5/5 Stars.
- 1
- 2
- 3
- 4
- 5