Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get Order values in Sql query

Author  Topic 

a4nsd
Starting Member

20 Posts

Posted - 2006-11-24 : 11:21:30
Hi every body.
Can u tell me how to get the order values of the SQL query
Example.
My sqlstring ="Select * from tbl_Products"
And it returns 6 rows
And I want to get order values like this 1,2,3,4,5,6
I am a beginner.
Thanks a lots

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-11-24 : 11:32:32
select * from tbl_products order by code (given code is the field containing 1, then 2, then 3, etc on each row)
getting the values 1,2,3,4,5,6 on one line...is a different issue.
Go to Top of Page
   

- Advertisement -