Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Business Rule Enforcement
Message
From
07/12/2000 22:43:23
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Dynamic Business Rule Enforcement
Miscellaneous
Thread ID:
00450693
Message ID:
00450693
Views:
74
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
Map
View

Click here to load this message in the networking platform