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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 flag on colum - OrderNo

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2011-01-18 : 15:38:50
i have table with OrderNo,i want to recognize the one of order Number.

i use sql 2000

OrderNo
5555
5555
3333
3333
3333
6666
i want to get
OrderNo    flag
5555 1
5555 0
3333 1
3333 0
3333 0
6666 1

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-18 : 15:43:35
If you are using SQL Server 2000, then you should not post your question in a 2008 forum. I will move your topic to a 2000 forum.

You'll need to explain what "one of order Number" means.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-01-18 : 15:56:25
This?

SELECT * FROM YourTable WHERE flag = 1
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-01-18 : 16:26:51
What do you use as primary key?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -