tag:blogger.com,1999:blog-8176589.post8614593070271257548..comments2024-01-11T16:01:33.678-08:00Comments on Vladimir's Diary: On SQL*Plus DefinesVladimir Begunhttp://www.blogger.com/profile/16907104295178956732noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-8176589.post-25002630101763042162020-09-23T01:48:01.387-07:002020-09-23T01:48:01.387-07:00Hm, "where rownum = 0" is a strange beas...Hm, "where rownum = 0" is a strange beast indeed. It seems to always insert null into the undefined variables regardless of which values I provide for the columns.<br />Anyone knows why?<br /><br />Anyhow, my take on the thing:<br />Since scope is something that apparently simply does not exist, I simply created a<br />defaults.sql:<br />--------------<br />set echo off<br />set verify Joel Ericsonhttps://www.blogger.com/profile/11068804453027195846noreply@blogger.comtag:blogger.com,1999:blog-8176589.post-7186965251583016622019-09-13T10:27:54.727-07:002019-09-13T10:27:54.727-07:00I was ultimately lead here trying to figure out ho...I was ultimately lead here trying to figure out how to have a default for a substitution parameter. <br /><br />With Vladimir's help I ended up with this:<br /><br />/* <br /> Allows a default value to be used for a substitution parameter<br />*/<br /><br />SET VERIFY OFF<br />SET TERMOUT ON<br />SET SERVEROUTPUT ON;<br /><br />-- < 1 prevents sqlplus from prompting for a value when itdanhttps://www.blogger.com/profile/13790974835438379005noreply@blogger.comtag:blogger.com,1999:blog-8176589.post-6917682215307250862016-09-07T10:23:47.824-07:002016-09-07T10:23:47.824-07:00Unfortunately, I don't have it handy. I will a...Unfortunately, I don't have it handy. I will ask Pavel when I have a chance.Vladimir Begunhttps://www.blogger.com/profile/16907104295178956732noreply@blogger.comtag:blogger.com,1999:blog-8176589.post-86683182050367417022016-08-31T07:42:13.383-07:002016-08-31T07:42:13.383-07:00
Hi, Pavel Luzanov blog (http://www.geocities.com/...<br />Hi, Pavel Luzanov blog (http://www.geocities.com/luzanovp/) is not reachable. Are there any other link for those old sqlplus posts?Mustafa DOĞANAYhttps://www.blogger.com/profile/05645488077841804038noreply@blogger.comtag:blogger.com,1999:blog-8176589.post-10141502023288332092016-02-19T17:46:23.673-08:002016-02-19T17:46:23.673-08:00you are welcomeyou are welcomeVladimir Begunhttps://www.blogger.com/profile/16907104295178956732noreply@blogger.comtag:blogger.com,1999:blog-8176589.post-80385246488756129482016-02-19T09:56:50.257-08:002016-02-19T09:56:50.257-08:00Thank you very much for this cool trick!
I used it...Thank you very much for this cool trick!<br />I used it already tons of times and it's very very helpful<br /><br />p/s initially I read this from you blog. 2nd time found reference to this post from another siteTolegnoreply@blogger.comtag:blogger.com,1999:blog-8176589.post-8122917267069800242014-07-11T09:33:20.690-07:002014-07-11T09:33:20.690-07:00This is a great technique, but it is not clear fro...This is a great technique, but it is not clear from your example why sub_var1 got a value of 1 and sub_var2 got a value of 2 as shown with your DEFINE statements. Based on your select from dual, all four should initally be NULL ( "" )Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8176589.post-42690606433825811752012-06-29T10:48:03.499-07:002012-06-29T10:48:03.499-07:00Thanks, but only works if you have an active conne...Thanks, but only works if you have an active connection. What if parameter is used to pass user@connection to another sql script?Osymadhttps://www.blogger.com/profile/17193464045926541520noreply@blogger.com