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
 SQL Server Development (2000)
 help with a query

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-10-26 : 08:06:29
ii have a tablel ike this:
Pasportid |col2 forexample :
55555552 0
01242121 1
03212121 0

and i want to make a query in which i will recive all the number that may start with 5 and when the first number isnt 5 then check col2 and if its value is 1 then get it !
in the above example the first 2 rows are ok andthe third one inst
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-26 : 08:13:41
select * from tablel where pasportid like '5%' or col2 = 1


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-10-26 : 08:31:46
so simpel i dont know why i got my self so complicated

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page
   

- Advertisement -