| Author |
Topic |
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2011-02-08 : 23:04:36
|
| I have the following values came with in a parameter: prmAnd"Application, for payment, order history"Is it possible to split using comma and use and operator.after split want to do this:field1 = 'Application' and field1 = 'For payment' and field1='order history'Thank you very much for the helpful info. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-02-09 : 04:46:56
|
| http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/- LumbagoMy blog-> www.thefirstsql.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-09 : 08:19:29
|
| <<field1 = 'Application' and field1 = 'For payment' and field1='order history'>>Does the field name differ? You used field1 onlyMadhivananFailing to plan is Planning to fail |
 |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-02-09 : 08:52:25
|
He is trying to make the parameter work like an IN(@Param) operator I think...so that this "Application, for payment, order history"will become this Field1 IN('Application', 'for payment', 'order history')Maybe the OP could clarify ...seems to be a popular topic choice these days Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2011-02-09 : 10:57:08
|
quote: Originally posted by madhivanan <<field1 = 'Application' and field1 = 'For payment' and field1='order history'>>Does the field name differ? You used field1 onlyMadhivananFailing to plan is Planning to fail
|
 |
|
|
cplusplus
Aged Yak Warrior
567 Posts |
Posted - 2011-02-09 : 10:58:34
|
| Hello Madhivanan,Yes, i have 16 fields, to be checked.field1 to field 16 using all those parameter values against and , or ,not operators.Thank you. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-02-10 : 03:17:52
|
quote: Originally posted by cplusplus Hello Madhivanan,Yes, i have 16 fields, to be checked.field1 to field 16 using all those parameter values against and , or ,not operators.Thank you.
You need to give more informations to help youPost some more sample dataMadhivananFailing to plan is Planning to fail |
 |
|
|
|