
SQL
Get flash to fully experience Pearltrees
Free SQL Server tools that might make your life a little easier
I have seen a common requirement where we have numbers and alphabets mixed up in a column (house no in the address field) and the number has to be extracted out of the string. Here's a query to do so: -- This query is a Modification of the Original query by 'usenetjb' DECLARE @NumStr varchar(1000) SET @NumStr = 'This string contains 5 words and now 9 words';
Extract Numbers from a String using Sql Server 2005
SQL Pivot
Well, so far I have written few small example of PIVOTing the data in SQL Server and thought that now this is enough about PIVOT, I won’t write anything more about PIVOT but when I seen one good stored procedure for dynamic PIVOT in expert exchange forum written by my friend and very experienced person Mr. Mark Wills I tempted again to share PIVOT material with my reader. Let us FIGHT THE FEAR OF PIVOT with SQLHub.com Here is the article written by Mr. Mark Wills. I am sure my blog reader will like his article very much.
SQL-Server Blog of Ritesh Shah --Fight the fear of SQL with SQLHub.com: Generic stored procedure for PIVOT in SQL Server
Another Dynamic SQL CrossTab Stored Procedure
First off, before going any further make sure you have read the hall of fame SQLTeam article by Rob Volk on generating crosstab results using a flexible, dynamic stored procedure that has been viewed over 100,000 times! This entire concept and pretty much all of the ideas I've had regarding this topic and this techinique in general are all due to Rob's great work and his very clever stored procedure. It must be crosstab season or something, because lately I've been getting quite a few emails and comments about an alternative stored procedure that I've posted in the comments to that article that has been helping quite a few users.Crosstab Pivot-table Workbench
Dynamic Cross-Tabs/Pivot Tables
Dynamic Crosstab with multiple PIVOT Columns - Madhivanan
001. CREATE PROCEDURE [dbo].[genericCrosstab] 007. @tableSpec NVARCHAR(4000) = '' , 013.

