|
-
February 22nd, 2000, 12:11 PM
#1
Stored procedure
I need to write a stored procedure to retrieve data from a table passing combinations of parameters.
Example
create procedure name
@ssn,@lname,@fname,@dateofbirth,@hiredate(etc)
select all related information for a particular employee
from table
where ssn = @ssn and lname = @lname when i pass first two parametes only.
like that i have to pass different combinations to get the same data.
I wrote this stored procedure by using if conditions but it looks pretty lengthy.
Is there any way to shorten the code.
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|