Posted by: NepaliBhai August 27, 2014
SQL Select Statement
Login in to Rate this Post:     0       ?        
Run this script
create table #table1(steps int)
insert into #table1(steps)values(1)
insert into #table1(steps)values(3)
insert into #table1(steps)values(4)
insert into #table1(steps)values(5)

select steps from #table1
drop table #table1

You will get this
steps
1
3
4
5

I want this way.
stepFrom    stepTo
1                3
3                4
4                5
Hints: you need to join the same table multiple times.
Last edited: 27-Aug-14 09:30 AM
Read Full Discussion Thread for this article