Information générale
Forum:
Microsoft SQL Server
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement