Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. CREATE PROCEDURE ValidateFormat (
  2. IN sometable VARCHAR(255)
  3. )
  4. BEGIN
  5. DECLARE OriginalTable;
  6.  
  7. Set OriginalTable = sometable,
  8.  
  9. -- try and figure out what the table name should be...
  10. IF sometable IS NULL or sometable = '' THEN
  11. SET sometable = '',Concat(cast(client)),'.''v$TABLENAME$'
  12. ELSE IF sometable like '%.%' THEN
  13. SET sometable = '', concat(cast(client)),'.',sometable
  14. ELSE
  15. SET sometable = '',Concat(cast(client)),'.',sometable;
  16. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement