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 |
|
sinichi
Starting Member
2 Posts |
Posted - 2012-10-30 : 21:09:05
|
| hi! good day,help me with this please, is this right??SELECT * FROM a_tablename WHERE * LIKE '%a_value%'cuz i want to find a specific value in all of my columns, but it would'nt work..can you help me out?sinichi-lio |
|
|
sinichi
Starting Member
2 Posts |
Posted - 2012-10-30 : 21:17:28
|
| soory i forgot to include FROM and the table name.its actually like this.SELECT * FROM a_tablename WHERE * LIKE '%a_value%'.tnx sqlconfusedsinichi-lio |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-10-30 : 22:18:08
|
| WHERE col1 LIKE '%a_value%'or col2 LIKE '%a_value%'....if you want the string to span columns then a single col1+col2+... like ... (maybe with coalesce to take care of nulls).You can generate the statement from information_schema.columns.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|