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 |
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-11-21 : 12:33:55
|
| Hi friends,I have table with following coloumnsid, customerCode123_Regular, Cust1345_Weekly,Cust136_Weekly,Cust1From the above data I want to to select the weekly and regular customers as separate datajust using one query with a Customertype parameter being passed from the front end.when The user chooses 'weekly' as CustomerType compare with the id field and get all the id's with weekly in them and same for 'Regular'Just has to be one select statement. |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-11-21 : 12:42:15
|
| WHERE ID LIKE '%' +Parameter + '%'JimEveryday I learn something that somebody else already knew |
 |
|
|
akpaga
Constraint Violating Yak Guru
331 Posts |
Posted - 2012-11-21 : 15:35:51
|
| Thank you Lamprey and jimf for the responses..Got it with you help. |
 |
|
|
|
|
|