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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to pass a stringas parameter in stored procedu

Author  Topic 

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2008-03-14 : 22:04:34
hi

i have database which stores a field with varchar. the field stores the data in following way :
@@@@paga###newyork@@@@

i need to pass a parameter so that i get all the people in new york
or chicago.but i dont know how to pass the parameter with the garbage in the middle.
CAn i use 'like' in parameter of stored procedure.

Thanks in advance
akpaga

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-03-15 : 05:10:57
Do you want to pass multiple values and get respective matches?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2008-03-15 : 10:18:28

i would like to pass new york or chicago

ie that makes it a single value..i guess.

thanks
Go to Top of Page

akpaga
Constraint Violating Yak Guru

331 Posts

Posted - 2008-03-15 : 10:24:40


something of this kind

where city like '%newyork%' in the form of a parameter
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-03-17 : 04:34:39
http://www.sommarskog.se/arrays-in-sql.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -