tag:blogger.com,1999:blog-2807785752181271137.post6181333215895087904..comments2024-03-06T12:33:57.350+01:00Comments on Damir Vadas, Oracle as I learned: Toad’s Automation Designer and sqlplus defined variablesDamir Vadashttp://www.blogger.com/profile/15963017378937428976noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-2807785752181271137.post-43448474002595746692020-11-18T15:54:09.973+01:002020-11-18T15:54:09.973+01:00solution 1 is not working with result multiple row...solution 1 is not working with result multiple rows of define_date_value.sql script.<br /><br />try it:<br />@echo on<br />FOR /F %%i IN ('sqlplus ETL/etl123@10.2.16.206:1521/BIP @define_date_value.sql') DO (<br /> if not "%%i"=="SQL*Plus:" if not "%%i"=="Copyright" if not "%%i"=="Last" if not "%%i"=="Connected" if not "%%i"=="Oracle" if not "%%i"=="With" if not "%%i"=="Disconnected" (<br /> set /A x=%%i<br />call :SetVar))<br /> goto :eof<br />:SetVar<br /> set y=%x:~2,2%/%x:~0,2%/%x:~4,4%<br /> echo %y%<br /> type Export1.ini | repl "ABCXYZ1" %y% > Export%x%.ini<br /> "C:\Program Files\Quest Software\Toad for Oracle 2017 R2 Edition\Toad for Oracle 12.12\toad.exe" -a "App1|C:\Users\hoang\Documents\Baocaokhaivi\Export%x%.ini"<br /> goto :eof<br />Toanhvhttps://www.blogger.com/profile/03309857254106163803noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-27815221381875867892016-10-26T04:17:57.190+02:002016-10-26T04:17:57.190+02:00Toad for analyst has a feature like shown directly...Toad for analyst has a feature like shown directly supported.<br />More in http://dev.toadfordataanalyst.com/webhelp/content/Automation/Tutorials/Automation_Variables.htm<br />Maybe this will be a nice example how to solve the same thing in Toad as well....Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-78728838136146714382016-10-13T16:32:49.197+02:002016-10-13T16:32:49.197+02:00Hi John,
Thx for your clarification.
What I think...Hi John,<br /><br />Thx for your clarification.<br />What I think, if variable is inside Toad defined as global, then Toad should pass a value as it is.<br />I know that global in Toad context has different meaning, but then you should declare Toad call of variables like $XXX or somehow different than %XXX%, what is core OS based call, so people should not think about this ...if there any variable inside Toad which will prevent execution.<br />Brg<br />DamirDamir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-2807785752181271137.post-17968460479105494832016-10-13T16:04:35.262+02:002016-10-13T16:04:35.262+02:00> If XXX variable is defined inside Toad, then ...> If XXX variable is defined inside Toad, then this was not working...what I find mre as a small Toad bug <br /><br />Hello Damir, <br /><br /> It's not a bug, just a misunderstanding of how it works, I think. <br /><br /> You can set OS variables from the OS. <br /> You can set Toad variables from Toad.<br /> You cannot set Toad variables from the OS.<br /><br /> When evaluating a variable, Toad first for Toad variables. If Toad does not find a Toad variable by that name, only then it looks for OS variables.<br /><br /> I hope that clears things up.<br /><br />-John Dorlon<br />Unknownhttps://www.blogger.com/profile/09193484202502153598noreply@blogger.com