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)
 Q

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-16 : 23:16:50
Rob writes "Dear Mr. Guru,
I am developing a website which is a front end to a database (SQL Server 2000, Win2000). The database consists of one main table (called "MHS") with about 20 fields and a few other tables with one or two fields each. The website has pages which allow the user to add, edit, or view the contents of the main table. There are "add_form" and "edit_form" asp pages which have a few textboxes and a few pulldown boxes (from a select statement in HTML).
The choices for these pulldown boxes come from the smaller tables in the database. For one of the fields, however, it is necessary to allow the user to select more than one option. This is done using a list of checkboxes (where the values are from one of the smaller tables). So for this particular field in the MHS table (called "Platform"), there can be more than one value (separated by commas).
This is all well and good, except for the query page. This page gives a list of pulldown choices for all the fields in the MHS table. When the submit button is pushed, the records are shown with the conditions chosen in the form. In Javascript or VBScript I could easily search for a single Platform among multiple ones separated by a character, but can I do that in SQL? Right now when I use the query tool and try to query by a specific Platform, the rows with multiple platforms are not returned, whether or not they contain the requested value."
   

- Advertisement -