Advertisement
Guest User

Untitled

a guest
Jul 27th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. BEGIN
  2.  
  3. DECLARE cKey, cVerNo INTEGER ;
  4.  
  5. SET (cKey, cVersion) =
  6. (SELECT max(c.KEY), max(c.VERSION) FROM schemaA.COLLECTION c WHERE c.YEAR = @cYear);
  7.  
  8. SELECT count(*) FROM schemaA.tbl_Fact tf WHERE tf.CKEY = cKey AND tf.CVERSION = cVersion;
  9.  
  10. SELECT count(*) FROM schemaA.tbl_Scope ts WHERE ts.CKEY = cKey AND ts.CVERSION = cVersion;
  11.  
  12. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement