Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 dummy questions
Message
De
02/09/1999 09:49:22
 
 
À
28/08/1999 08:20:13
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00258791
Message ID:
00260567
Vues:
17
Since Ross gave you an answer for the second question, I try the first one.

Why don't you like using an IF? It could look like this:
IF EXISTS(SELECT * FROM current where ...)
  SELECT * FROM current where ...
ELSE
  SELECT * FROM history where ...  
If it wasn't a current or history situation, in other words the query might find rows in both tables, you could do something like this:
SELECT * FROM current WHERE ...
UNION
SELECT * FROM history WHERE ...
-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform