Hello folks,
I'm trying to issue multiple sql statements (as user defined sql) in a uv stage to drop and (re-)create a table and subsequently create secondary indices. I know that I can drop and create by enabling the correspondent controls. But whith user defined sql, statements separated by semicolon, I get error messages:
With each statement on separate lines, DS complains about something displayed like a pipe '|'. Having all statement on one line, CREATE (after the first semicolon) is said to be unexpected?
I hope somebody of you is ready to reveal the secret .
multiple sql in uv stage
Moderators: chulett, rschirm, roy
multiple sql in uv stage
Kind Regards
Stephan
Stephan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Here's another approach, provided there are no job parameters in the SQL.
Execute both/all SQL statements from your Administrator client Command window. Then select them and Save. (The selected SQL statements will be saved as a "paragraph" in the VOC file of the project. You will be prompted for the name under which to save.)
In the user-defined SQL of the UV stage, simply name this paragraph. (You may need to precede it with CALL - the paragraph is being invoked as a stored procedure.)
Execute both/all SQL statements from your Administrator client Command window. Then select them and Save. (The selected SQL statements will be saved as a "paragraph" in the VOC file of the project. You will be prompted for the name under which to save.)
In the user-defined SQL of the UV stage, simply name this paragraph. (You may need to precede it with CALL - the paragraph is being invoked as a stored procedure.)