Is there an alternative to SET DEFINE OFF in vertica? or have I got the syntax incorrect?
Thanks
Set define?
Moderator: NorbertKrupa
Re: Set define?
Hi Rick,
Are you talking about the Oracle SET DEFINE OFF command? If so, why would you need this in Vertica? Can we have substitution variables in our scripts for Vertica?
Are you talking about the Oracle SET DEFINE OFF command? If so, why would you need this in Vertica? Can we have substitution variables in our scripts for Vertica?
THANKS - BECKSTER
Re: Set define?
Yeah, not sure it's just someone sent me an SQL script to load some data into our database and it had some set define off commands in it. I just omitted them, but I was curious as to their purpose and the alternative in vertica. (I don't actually know what it does)
Re: Set define?
Hi Rick,
In Oracle we use the SET DEFINE OFF command to turn off substitution variables. That is, in a script we can have a variables (defined like &variable_name). When executing the script, if a substitution variable is encountered, Oracle will stop execution of script to ask for a value for the variable. If you are inserting data that has ampersands in it Oracle will think it is a variable when it really isn't. So we use SET DEFINE OFF prior to statements that have data like that so it can be properly inserted.
I don't think this is needed in Vertica because from what I know about vsql it does not not have the ability to prompt for values for variables.
In Oracle we use the SET DEFINE OFF command to turn off substitution variables. That is, in a script we can have a variables (defined like &variable_name). When executing the script, if a substitution variable is encountered, Oracle will stop execution of script to ask for a value for the variable. If you are inserting data that has ampersands in it Oracle will think it is a variable when it really isn't. So we use SET DEFINE OFF prior to statements that have data like that so it can be properly inserted.
I don't think this is needed in Vertica because from what I know about vsql it does not not have the ability to prompt for values for variables.
THANKS - BECKSTER
Re: Set define?
Ah, okay. Thank you for explaining it to me