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)
 Checking to see if 4,5 or 6 colums of a record match input parameters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-23 : 18:30:15
Wayde writes "I have a table that has 6 colums (fields).
I want to write a stored proc that takes in 6 parameters (int) and compares those against each record in the table.

If all of the 6 colums match I'd like to return those records

If 5 of the 6 columns of the record match any 5 of the 6 input parameters then I'd like to return those records in a separate recordset

If 4 of the 6 columns of the record match any 4 of the 6 input parameters then I'd like to return those records in a separate recordset


How can I go about doing something like this ?


Regards

Wayde"
   

- Advertisement -