I have a variable that is passed to a .bat file within the bat file
SET MYVAR1=%1
db2 call myuser.myproc(%MYVAR1%)
What I need to do is wrap the variable is single quotes
i.e. DB needs to be 'DB'
Thank you in advance for your assistance
Marcus
Adding quotes to a variable
Moderator: DosItHelp
Never mind... figured it out
Thanks
I just need to fight the dragon for a few more minutes.
I just need to fight the dragon for a few more minutes.
Re: Adding quotes to a variable
You can do it with the first opportunity:
SET MYVAR1='%1'
db2 call myuser.myproc(%MYVAR1%)
or second opportunity:
SET MYVAR1=%1
db2 call myuser.myproc('%MYVAR1%')
If you want to start i.E. myuser.myproc('DB')
SET MYVAR1='%1'
db2 call myuser.myproc(%MYVAR1%)
or second opportunity:
SET MYVAR1=%1
db2 call myuser.myproc('%MYVAR1%')
If you want to start i.E. myuser.myproc('DB')
Re: Adding quotes to a variable
mwilson58 wrote:I have a variable that is passed to a .bat file within the bat file
SET MYVAR1=%1
db2 call myuser.myproc(%MYVAR1%)
What I need to do is wrap the variable is single quotes
i.e. DB needs to be 'DB'
Thank you in advance for your assistance
Marcus
"db2"... "declare bytes 2"... What kind of Assembly-derived command is that?! Where you download?