Variable schema name for SQL Builder generate code
Moderators: chulett, rschirm, roy
Variable schema name for SQL Builder generate code
Hello all,
Please take a look to the following question and leave your comments.
The SQL Builder, for Oracle stages, has been of great help for my current project and I want to keep using it. My question is if there is some way to get a variable or parametric name as the schema name?
Perhaps doing something in the Table Definitions?
Here is a picture to explain this better.
Thank you,
Yonny R. Serrano
Please take a look to the following question and leave your comments.
The SQL Builder, for Oracle stages, has been of great help for my current project and I want to keep using it. My question is if there is some way to get a variable or parametric name as the schema name?
Perhaps doing something in the Table Definitions?
Here is a picture to explain this better.
Thank you,
Yonny R. Serrano
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No, I meant generated SQL.
I suspect that this, too, would be erased when you open the builder.
Therefore I have no answer to suggest.
Does your support provider have a solution?
I suspect that this, too, would be erased when you open the builder.
Therefore I have no answer to suggest.
Does your support provider have a solution?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
First off, a caveat: I think the SQL Builder tool sucks and is totally unneeded, except on paper so you have it as part of your feature set. I wouldn't touch it with a ten foot pole. There, with that out of the way...
I don't believe you can parameterize the schema with the SQL Builder. I use the 'Generate SELECT from blah blah' option religiously and always parameterize the schema. Trivial to do there. Perhaps you could consider a change in philosophy?
If you insist on using the SQL Builder tool to build the sql and insist on then being able to change the table's schema, you'll need to do it in steps. Generate the sql, copy it to the clipboard, paste into your editor of choice, make the schema change, switch the stage to Custom SQL and then paste your tweaked version into the stage.
ps. Been playing with this while posting. Looks like you have one other option and that would be to make the entire "schema.tablename" a single job parameter. Then right-click on the table on the 'canvas' in the Builder and select Properties. Even though the tablename is Read Only, you can click on the ellipsis and then 'Insert Job Parameter'. At runtime, you could then change just the schema name in the parameter. Of course you could change the table name too but that would just make it blowed up real good.
I don't believe you can parameterize the schema with the SQL Builder. I use the 'Generate SELECT from blah blah' option religiously and always parameterize the schema. Trivial to do there. Perhaps you could consider a change in philosophy?
If you insist on using the SQL Builder tool to build the sql and insist on then being able to change the table's schema, you'll need to do it in steps. Generate the sql, copy it to the clipboard, paste into your editor of choice, make the schema change, switch the stage to Custom SQL and then paste your tweaked version into the stage.
ps. Been playing with this while posting. Looks like you have one other option and that would be to make the entire "schema.tablename" a single job parameter. Then right-click on the table on the 'canvas' in the Builder and select Properties. Even though the tablename is Read Only, you can click on the ellipsis and then 'Insert Job Parameter'. At runtime, you could then change just the schema name in the parameter. Of course you could change the table name too but that would just make it blowed up real good.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hello all, thank you for your answers.
My support provider did not give a useful response. So, we are using chulett's suggestion:
yserrano
My support provider did not give a useful response. So, we are using chulett's suggestion:
Best regards,Generate the sql, copy it to the clipboard, paste into your editor of choice, make the schema change, switch the stage to Custom SQL and then paste your tweaked version into the stage.
yserrano