Re: Enter Substitution Variable pop up
Windows 2008 - OS
Oracle 11.2.0.2 - Database
SQL Developer 3.1.0.7
I am getting a very annoying pop ups about entering a substitution variable in Oracle SQL Developer, how can I set this off?
I get the pop up when I try to open any connection, it doesn't matter what database.
Jim Smith wrote:
Do you have a login.sql with substitution variables?
Tools | Preferences | Database | Filename for connection startup script.Jim,
Yes I had a file name and as soon as I removed it, it worked
- thanks, really apprecaite it.
Edited by: 868332 on Mar 2, 2012 8:08 AM
Similar Messages
-
Enter Substitution Variable I: (capital letter I for Indigo)
Hello all,
I urgently need to run a query in SQL Developer today but one of my 'case... when' clauses which I had to modify slightly is causing the query to ask for a Substitution Variable. I have never seen this before and can't see any fault in my code so I'm confused and getting frustrated why this problem has suddenly appeared today on the reporting run.
The original clause works fine:
,case when lower(class_name) like ('%funding note%')
then 0
else orig_bal
end orig_bal_amdI altered it to this:
,case when geo_segment_name in ('NorthAmer')
then case when bus_grp_typ in ('CMBS')
then case when c_bond_type_desc not in ('P&I')
then c_notional_amount
else orig_bal
end
else case when lower(class_name) like ('%funding note%')
then 0
else orig_bal
end
end
else orig_bal
end orig_bal_amdor this:
,case when geo_segment_name in ('NorthAmer')
and bus_grp_typ in ('CMBS')
then case when c_bond_type_desc not in ('P&I')
then c_notional_amount
else orig_bal
end
else case when geo_segment_name in ('NorthAmer')
and lower(class_name) like ('%funding note%')
then 0
else orig_bal
end
end orig_bal_amd also strangely this, which reverts the above to be syntactically the same as the first simpler (working) cause, is also causing the substitution problem.
,/*case when geo_segment_name in ('NorthAmer')
and bus_grp_typ in ('CMBS')
then case when c_bond_type_desc not in ('P&I')
then c_notional_amount
else orig_bal
end
else */case --when geo_segment_name in ('NorthAmer')
when lower(class_name) like ('%funding note%')
then 0
else orig_bal
end orig_bal_amd
-- end orig_bal_amd does anyone have any idea why this is happening? i really need to get this data run and I have no idea what is causing this issue.
thank you very much in advance for any ideas.
jon
Edited by: berlinhammer on 04-Jan-2011 05:17" then case when c_bond_type_desc not in ('P&I') "
Any variable preceded with & behaves like a substitution variable .. Hence here , I behaves like a substitution variable .
for more info :-
http://www.oracle.com/technology/support/tech/sql_plus/htdocs/sub_var9.html
Way to make an "&" be treated as text and not cause a prompt. Turn all variable substitution off:
set define off
Or
Use escape characters.
Thanks.
Edited by: Parul Garg on Jan 4, 2011 6:51 PM -
Prompted for Substitution Variable at Startup?
Ever since I've been on version 1.2.0.29.98, when I start up SQL Developer and attempt connection to one of my databases, I get a modal popup window titled "Enter Substitution Variable" with OK and Cancel buttons. The name of the substitution variable I'm prompted for is GNAME.
I have a couple of different Oracle homes on my machine, and I recognize gname as a lexical parameter I use in "login.sql" scripts for SQL*Plus (see http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:446220075876). Can you tell me from where SQL Developer might be picking up this lexical parameter for which it insists on substituting a value? The popup is annoying, and I'd prefer to make it go away.
At first I thought it may have been due to a login.sql I have that lives in the same directory as the one I specified containing SQL*Plus (Tools -> Preferences; SQL*Plus -> SQL*Plus Executable), but even after I rename that login.sql's filename, the GNAME substitution persists.
Thank you.
Windows XP SP 2
SQL Developer 1.2.0.29.98
Database 9.2.0.6Someone else asked the same thing this morning:
Replacement Variables/Column formatting in SQL*Developer
At the moment, sqldev tries executing a "login.sql" from the Script Directory. If that doesn't exist, he looks for it in the sqlplus path. No other possibilities nor preferences.
K. -
SQLPlus problem - user enters quote in substitution variable
Hello,
I have a SQL Plus script report, where user is prompted to enter "customer name".
Some customer names contain single quotes/apostrophes.
When user type such name, the script will error out with
ORA-01756: quoted string not properly terminated
I can't ask users to use '' instead of ' . I can't control what they enter. Is there a way to process single quote so the statement below will work:
select * from sometable where customer_name = '&1'
where &1 = Smith's
I can't do replace, etc, because it's all error out with the same error. I need to replace ' on SQLPlus level somehow. One logical way to do it would be to redefine the string separation charachter somehow...
SQL*Plus: Release 8.0.6.0.0
Thanks,
Vlad
Message was edited by:
user454392As it's a SQL*Plus substitution variable it is literally copied into the code just prior to compilation, so you can't stop it from breaking the compilation of the code. q quoted strings are the only solution I can think of but of course they are only available from 10g onwards.
The other alternative is to capture the input in a shell/batch script which validates it first and then passes the value to the SQL to be executed. -
Substitution variables by executing a SQL statement
If there is a "&text" in a SQL Statement, then SQLDEV automatically interprets this as an "substitution variable" and pops-up a box for entering the values of the variable(s) or takes the value of the "define myvariable myvalue;" statement. How can I turn this feature off? Is there a preference or a SQL-Plus Statement, so that SQLDEV ignores the "&variables"?
Cause: I have to run some (large) SQL-skripts, which contain some "&text", which should NOT be interpreted as substitution variables.SET DEFINE OFF
SS -
URGENT: Not seeing the variable Pop-up for Button , on web template in WAD
Hi gurus,
In IP I have a standard plan function for 'Copy', which has a few variables defined on the funciton itself (as to be changed):
Version from:
Version to:
Order from:
Order To:
Fiscal year from:
Fiscal year to:
All of the above variable are created with the following parameters:
Variable input: Optional (have also tried madantory)
Ready for input: is flagged.
Variable represents: Single value.
No default entry.
No personalized data.
Now in WAD, I create a button group for this function by selecting the Command, 'Executing Planning Function (simple)', manually entering my plan function technical name next to 'Command specific parameters', and selecting the dataprovider created for the filter I created in IP, and finally flagging the 'Display variable' button.
The problem is, on the web template the variable screen does not appear when I click on the function button. It executes the function in the background without giving me the pop-up for variable selection. And obviously since the variables have no default values, nothing is processesed.
I've tried this with planning sequence instead, and still wont give me the variable pop-up screen..
I've actually explicitlet entered the variables on the 'Parameters for Command screen', the same screen where you enter the filter for databinding and well as the function.
It still wont work (no variable pop-up screen).
Is this issue related to the support pack. We're on SP12 right now?
If not, do any of you gurus have any ideas? Big points will be rewarded for this.
ThanksIn the parameterization of the command, there is an option 'show variable screen'. I am not sure if you have mentioned this clearly, but have you checked this option?
-
Error When Prompting for Substitution Variable
Hi - I'm receiving an error when I try to run the following using the substitution variable - but only when I enter a string; when I enter a numeric value it runs fine.
DECLARE
l_SCR_Info VARCHAR2(50) := '''SCR'||&SCR_NUM||'-'||'''';
begin
dbms_output.put_line(l_SCR_Info);
end;Here is the error I receive when I supply a string value when prompted:
ORA-06550: line 3, column 52:
PLS-00201: identifier 'AB' must be declared
ORA-06550: line 3, column 27:
PL/SQL: Item ignored
ORA-06550: line 10, column 22:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 10, column 1:
PL/SQL: Statement ignoredCan anyone shed some light on what I'm missing here?
Thanks!
ChristineHi,
It looks like you just want one string there:
l_SCR_Info VARCHAR2(50) := '''SCR&SCR_NUM-''';Remeber how substitution variables work: SQL*Plus replaces them with values before sending the code to the back end to be compiled.
If you give a value like AB for the variable, the code you posted is equivalent to:
l_SCR_Info VARCHAR2(50) := '''SCR'|| AB ||'-'||'''';by the time it reaches the compiler. AB is not inside quotes, so the compiler looks for a variable or function called AB.
If you gave a number:
l_SCR_Info VARCHAR2(50) := '''SCR'|| 123 ||'-'||'''';there's no problem; the compile knows what the literal number 123 is. -
Problem with my substitution variable.
My substitution variables don't prompt properly now. It worked fine before, but I don't know what I did to it. Here is the test code:
set define on;
connect sys/&sysPassword @&instanceName as sysdba;
execute dbms_output.put_line('this is a test');
When I tried to execute above lines in sqlplus, it didn't prompt anything, but got following result instead:
SQL> set define on;
SQL> connect sys/&sysPassword@&instanceName as sysdba;
Enter value for syspassword: execute dbms_output.put_line('this is a test');
Enter value for instancename:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[<password>][@<connect_string>] | /
SQL>
I remember when I used substitution variables before in sqlplus worksheet, it popup a dialog for input, but it doesn't anymore.
Any ideas about this issue? Or what setting could affect the behavior? Thanks in advance.It would work only if you put these set of statements in a .SQL file and run that file at SQL*Plus prompt:
SQL> @the_sql_script_created_above.SQL -
Substitution variable - Problem
The requirement is to have numeric value to a substitution variable. In essbase there is a provision to set numeric value to a substitution variable . i tried out the below one its not working.
Create a sub variable and assigned value "12" and tried using the same sub variable in the MDX query but getting error. kindly let me know is it possible to set a numeric value to a sub variable and use the same in MDX formula. Any help would be greatly appreciated.
I have seen this note in dbag :
If a substitution variable value is numeric, different rules apply for how you enter the variable:
If it is not used in MDX statements, enclose a substitution variable value in quotation marks; for example, if the variable name is Month, and its corresponding value is 01 (corresponding to January), place quotation marks around 01 (“01”). Substitution variables usually are used with block storage databases; they are not used in MDX statements.
If it is used in MDX statements only, such as in formulas in aggregate storage outlines, and the value is numeric or a member name, do not enclose the value in quotation marks.
Note:
If a substitution variable value is numeric or a member name starting with a numeral or containing the special characters referred to above is to be used both in MDX and non-MDX situations, create two substitution variables, one without the value enclosed in quotation marks and one with the value in quotation marks.i got the way to do
-
Oracle 10g express edition ..ampersand substitution variable
when i enter the ampersand substitution variable and run the script in the oracle 10g express edition it is giving me the error of (ORA-01008: not all variables bound)...can someone please indicate what the problem is..
thank youi am running the script in the browser but when i run it it does not give me the possibility to enter the value and that error which i mentioned before comes instantly
reuben -
Variable pop-up using Button Group in WAD
Hi experts,
I've created a button group in WAD to execute a 'Copy' function developed in IP.
This copy function has the following variables:
Order From:
Order To:
Version From:
Version To:
This button group was created as it should referencing my copy function, with a dataprovider of type filter, and under 'Behavior' I have flagged the ' Display variable screen' field.
So when I click on this button, it should give me a pop-up screen for me to enter those variable values.
The problem is, it's not giving me this pop-up screen. Does anyone know why? Or if I've missed something.
thanks
Edited by: Ehab Mansour on Feb 28, 2008 10:48 AMHi Maykan,
I will give that a try, and let you know how it worked out.
By the way, are you aware of any 'WAD' specific documentation that provied details and more WAD capabilities?
thanks -
Substitution Variable in Cursor
Good morning,
I'm creating a script that uses a substitution variable (comma-delimited list of numbers) in the main cursor. Here's the sql statement used in the cursor:
SELECT individual_id
FROM individual
WHERE individual_id IN (&&individual_id)
order by individual_id;I then loop through that cursor and look up additional information which is then written as output. My question is this, when an individual id (provided in the substitution variable's comma-delimited list) is not found, I need a way to parse it out and provide feedback. Since it's not located in the individual table, I need to find a way to still return it in the cursor (or find another way) in order to note that no processing could be done for that value.
I hope this is clear.
Thanks,
ChristineYou mean you want to outer join?
SQL> ed
Wrote file afiedt.buf
1 with t as (select '&emp_names' as txt from dual)
2 ,emps as (select REGEXP_SUBSTR (txt, '[^,]+', 1, level) ename
3 from t
4 connect by level <= length(regexp_replace(txt,'[^,]*'))+1)
5 --
6 select emps.ename, emp.empno, emp.sal
7 from emps left outer join emp on (emp.ename = emps.ename)
8* order by emps.ename
SQL> /
Enter value for emp_names: SCOTT,JAMES,SMITH,JONES,BRADFORD
old 1: with t as (select '&emp_names' as txt from dual)
new 1: with t as (select 'SCOTT,JAMES,SMITH,JONES,BRADFORD' as txt from dual)
ENAME EMPNO SAL
BRADFORD
JAMES 7900 950
JONES 7566 2975
SCOTT 7788 3000
SMITH 7369 800
SQL> -
Substitution variable in BR Graphical Interface
Hi,
we have a business rule using a prompt that we would like to change to a subtitution variable. But we can't just enter "&AnCour" (for current year).
I didn't found any place where I could select my substitution variables (I can select prompts and local variables but not substitution variables).
If I go to the "Source" tab and use a standard script, it works, so I'm assuming that BR can use substitution variables but that the graphical interface can't. I always use standard scripting for administration BR, but our users don't want to let the graphical interface go for their own scripting.
Is there a way to use subtitution variables in a graphical BR ?
We are using System9 9.3.1
ThanksSo it works in a calc script and not a BR, I know BR's sometimes don't always act exactly the same as calc scripts and you occassionally hit issues like this.
What version are you using because I have a feeling I have tested this in the past and I am sure it worked.
Cheers
John
http://john-goodwin.blogspot.com/ -
Substitution variable in Calculation manager
Hi,
In calc manager there are two types of variable
1. replacement
2. execution.
I want to know that is there any connection between substitution variable in Essbase and these variable?
In a document, I saw that
"Planning and Essbase users only: If you want to create a replacement variable for Planning or Essbase, on Replacement, do these tasks:
Enter a name for the variable.
Select a type for the variable:
Numeric—a number
String—a text string
Essbase—an Essbase substitution variable
Note:
You cannot use an Essbase substitution variable in a component of a business rule in an Essbase aggregate storage application, including those used in Oracle General Ledger."
But I have created an Essbase replacement variable for a EPMA essbase application but it is not reflected in Essbase.
Why?Hi, Rubi.
Last NOTE was about Essbase aggregate storage application (ASO). Planning apps (using EPMA) has been created in Block Storage option (BSO). It isn't so? -
Oracle SQL Developer version 1.1.2.25 BUILD MAIN-25.79
Running under WinXP
Issue description:
The Substitution variable dialog does not store the previously entered values.I'm talking about the "Substitution Variable"
do:
select * from mytable where mycolumn = &myvariable
execute
it opens a dialog for you to give &myvariable value
you put wnat you want and next time you re-execute the substitution field is empty
(do not confuse with the bind variable dialog that stores the previously entered data and has also small bug if data is number and you press an enter in the field hehe :)
Maybe you are looking for
-
Limited Edition Legend of Zelda Majora's Mask Availabili​ty
When will the limited edition version of Major's Mask be available? I checked a few times, but it says "Coming Soon" will it be available after an actual release date is announced? http://www.bestbuy.com/site/the-legend-of-zelda-majoras-mask-3d-limi
-
Ipod touch was working, shut down and will not power up
Ipod was working. Went dead and will not power up. The unit was charged. I connect it to a charger and I get nothing. Tried the power and home button combo but the unit is not responding. It is less than 6 months old
-
Shooting 1920x1080 but can only export 1080x720. Any solution ?
Hi everybody ! I've shooted videos with a Nikon D800. They are 1920x1080 files 30fps, which I converted with Brorsoft Video Converter to Apple ProRes 422 (HD), what I've been adviced to do. But after having edited my project with FCP, I'm only able t
-
ACE Drop (Dest nat fail):
Hi All, I'm using ACE module A2(2.4) I'm trying to use parameter server-conn reuse, but clients get sometimes statuscode 503. A#1/Test1# show np 1 me-stats "-socm -v" OCM Statistics: (Current) Errors: 0
-
How to change NLS parameters in Oracle XE?
Hi I have to change some parameters in database using Oracle XE server but I don't know how to do it. I must change these parameters: NLS_CHARACTERSET NLS_NCHAR_CHARACTERSET How to do it? Thanks for help.