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)
 Help with a where clause

Author  Topic 

smccreadie
Aged Yak Warrior

505 Posts

Posted - 2001-07-22 : 07:32:22

I'm working on an application that will send supply a hospital's accepted drug list to a PDA using the AvantGo service. One of the ways to search for the drugs is by picking the first letter of the name from a small table. Letters with a lot of drugs associated with them will be represented by a single letter (i.e. "A") whereas others will have multiple letters (i.e. "Y,Z"). Because the service works by spidering links, I hyperlink each letter(s) to a single page passing the value in a querystring (a href="http://www.someaddress.edu/druglist.asp?ID='lettervalue'"</a>).

I'm trying to figure out how to write my SPROC to take whatever is passed into the querystring and pull the correct drugs. I've tried IN ('A%') and LIKE ('Y,Z') and these don't work. Any ideas?
   

- Advertisement -