Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditional Logic
Message
From
17/06/2008 11:28:37
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Conditional Logic
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01324772
Message ID:
01324772
Views:
49
I need to do something like the following in a query.
DO WHILE looping through fetched rows and @MyVar changes value

BEGIN

IF @MyVar = 1
     BEGIN
          Do This
     END

IF @MyVar > 1
     BEGIN
          Do This
     END

IF @MyVar = 1 and there were no @MyVar > 1
     BEGIN
          Do This
     END

END
Next
Reply
Map
View

Click here to load this message in the networking platform