General information
Forum:
Microsoft SQL Server
Title:
Dynamic Business Rule Enforcement
I am looking for a little help
I am looking for a way to incorporate the contents of a variable into a query
Example
DECLARE @VAR1 nvarchar,
@VAR2 bit
SELECT @VAR1 = '< 100', @VAR2 = 0
/* I want to stuff the query with the contents of VAR1 as a parameter */
IF 200 @var1
/* I want this translated as 'IF 200 < 100' */
BEGIN
SELECT @VAR2 = 1
END
SELECT @VAR2
The goal here is to allow rules to be built and enforced dynamically.
My intent is to store the rules (@VAR1) in a table as they are built then different scenarios can be tested.
If you have another suggestion that would achieve the same goal I am open to suggestion.
Phil
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only