Curtis (I think!)
Thanks for the comment. I can use the define command within
the scripts; however, I’m looking to define or set the
variable in automation designer and have it picked up when
the script hits the &OWNER or &&OWNER. Do you know of a way
to do that?
If you need the automation designer (which I don’t use often) to run a
script which has “&” or “&&” in it, then you need some way to supply
those values at run time. There are a couple of ways and if we assume
&OWNER is all we need then we have:
Supply at run time on the command line:
sqlplus user/password@database @script_name.sql MY_OWNER
Then inside script_name.sql we have this:
Alternatively, you can replace all occurrences of &owner with &1.
Supply parameter as above to a master script:
sqlplus user/password@database @master_script.sql MY_OWNER
Then inside master_name.sql we have this:
And inside script_name.sql you use &owner or &&owner as normal.
Other than that, I can’t think of anything else that would allow you to
supply parameters at runtime - without user intervention.
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk