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 |
|
Scott
Posting Yak Master
145 Posts |
Posted - 2002-01-25 : 03:28:43
|
| Is there any way to use a wildcard in an integer where clause.Building dynamic SQL in an asp page:where int = 1 most times but also needwhere int = '%,*...'??? |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-01-25 : 03:34:44
|
| you can convert the integer to a varchar and use the string functions.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
spock
Starting Member
35 Posts |
Posted - 2002-01-25 : 03:36:52
|
| select * from table where cast(emp_id as varchar(4)) like '20%'this works.kaushik |
 |
|
|
kabapy
Starting Member
1 Post |
Posted - 2009-08-21 : 13:18:39
|
| It is Easyuse thisWHERE Id=@Id OR @Id=0Pass the id for results for this idand pass 0 to all RowsYou can replace 0 with -542313542 or any number below 0 for security purpose |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-08-21 : 14:29:03
|
kabapy....9 year old thread? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-08-24 : 02:34:17
|
quote: Originally posted by kabapy It is Easyuse thisWHERE Id=@Id OR @Id=0Pass the id for results for this idand pass 0 to all RowsYou can replace 0 with -542313542 or any number below 0 for security purpose
Did you read the question fully?MadhivananFailing to plan is Planning to fail |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-08-24 : 09:55:19
|
quote: Originally posted by madhivananDid you read the question fully?
I may have read it fully - it's just that after 7 1/2 years he probably forgot what it was. Be One with the OptimizerTG |
 |
|
|
|
|
|