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.
| Author |
Topic |
|
quarinteen
Starting Member
40 Posts |
Posted - 2008-09-26 : 16:14:41
|
| I need to do an insert based on multiple like statements how can i do that? the following is what i tried and it didnt workinsert into pcinfo (isvalidNode) values('1') where machineName like '%comp1%' or '%comp2%' or '%comp3%' |
|
|
jdaman
Constraint Violating Yak Guru
354 Posts |
Posted - 2008-09-26 : 16:27:04
|
| insert into pcinfo (isvalidNode) values('1') where machineName like '%comp1%' or machineName like '%comp2%' or machineName like '%comp3%' |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-27 : 02:06:18
|
quote: Originally posted by quarinteen I need to do an insert based on multiple like statements how can i do that? the following is what i tried and it didnt workinsert into pcinfo (isvalidNode) values('1') where machineName like '%comp1%' or '%comp2%' or '%comp3%'
update pcinfoset p.isvalidNode=1where machineName like '%comp1%' or machineName like '%comp2%' or machineName like '%comp3%' |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-27 : 02:07:36
|
| and why you didnt learn it from solution provided earlierhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111304 |
 |
|
|
|
|
|