Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Where Clause In Stored Procedure
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00634614
Message ID:
00634622
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
>I am building a QBE type form. There are 8 fields that the user might enter data into. If they enter data into the field, then I want to include that field in the where clause. Can you use IF's when building the stored procedure?
>
>Thank
>
>Kirk

Yes, you can. You can build a select command as a string and than execute it using T-SQL command EXECUTE or system stored procedure sp_executesql.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform