Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Brain Freeze
Message
 
À
30/10/2015 09:47:41
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01626701
Message ID:
01626703
Vues:
50
>The smart safe transaction table has two possible eventcode values DECL and VER
>
>a VER transaction can relate to one or DECL transactions.
>
>The verifyid column in a DECL transaction points to the VER transaction for that row, if any.
>
>I was to select ALL DECL rows where the verifyid column is 0 or if it's not zero the postingdate in the related VER transaction is earlier than a given date
>
>I get this far and go blank
>
>
>select * from view_expandedsmartsafetrans where eventcode = 'DECL' and verifyid = 0 
>
select *;
      from view_expandedsmartsafetrans VEXP;
LEFT JOIN VER ON VER.verifyid = VEXP.verifyid AND VEXP.transaction < SomeDate
where VEXP.eventcode = 'DECL';
 and VEXP.verifyid = 0 OR VER.verifyid IS NOT NULL
NOT TESTED!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform