SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Split two Columns data into range.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hspatil31
Posting Yak Master

175 Posts

Posted - 05/21/2012 :  02:36:52  Show Profile  Reply with Quote
Dear All,

In my table I have following table row data. I want to split Column5 and Column6 into range. Just like I mentioned in Desired Output.
Table row will deleted and range should be inserted into table.

Can anyone please tell me SQL statement for this ?

Table Row:

Column1 Column2 Column3 Column4 Column5 Column6
123 444 678 9876 0000 9999

Desired Output:

Column1 Column2 Column3 Column4 Column5 Column6
123 444 678 9876 0000 0999
123 444 678 9876 1000 1999
123 444 678 9876 2000 2999
123 444 678 9876 3000 3999
123 444 678 9876 4000 4999
123 444 678 9876 5000 5999
123 444 678 9876 6000 6999
123 444 678 9876 7000 7999
123 444 678 9876 8000 8999
123 444 678 9876 9000 9999





Thanks and Regard's
Harish Patil

Edited by - hspatil31 on 05/21/2012 02:56:06

khtan
In (Som, Ni, Yak)

Singapore
16746 Posts

Posted - 05/21/2012 :  04:06:32  Show Profile  Reply with Quote
what is your criteria for spiting ? increment of 999 ? 10 lines ?


KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000