|
petervarga
Starting Member
1 Post |
Posted - 2008-03-18 : 09:20:53
|
| Hi. I am new in sql and i need help for increment rows. This is my scriptI worked in ms sql 2000SELECT cool.Podchl,cool.Datumchl, cool.Textchl, cool.Timechl,cast ((substring(cool.Datumchl,7,4)) as int ) as year,cast ((substring(cool.Datumchl,4,2)) as int ) as month,cast ((substring(cool.Datumchl,1,2)) as int ) as day,cast ((substring(cool.Datumchl,13,2)) as int ) as hour,cast ((substring(cool.Datumchl,16,2)) as int ) as minFROM zih2.dbo.cool coolWHERE (cool.Timechl<>'00')ORDER BY year,month,day,hour,minI need add new colum, where first colum will be order. I made it but after execute order by I have got 2,3,4,1,5... and i need 1,2,3,4,5,... |
|