How to prevent substitution variable recognition?
Hi, is there any way to prevent the recognition of substitution variables in a SQL worksheet? For example, I would like to run the following query in SQL Developer 2.1.1.64:
SELECT UTL_HTTP.request ('http://localhost:8088/foo/servlet/bar?x=10&y=10')
FROM DUAL;Here, '&y' is not a substitution variable but a request parameter. Is there any way to escape the '&' sign? Or any other way to execute this query without substitution variable?
Thanks in advance.
Regards, Markus
Try this
set define offHTH,
dhalek
Similar Messages
-
How to use substitution variable in case of dim build
Hi all,
Lets say I have 3 sub vars - Prevmonth, prevmonth-1, prevmonth-2. These will change every quarter.
I want to build a cube which will have which will have only the above 3 months in the Fiscal dimension. This will be used once at the end of quarter.
How do I refer substitution variables in case of dim build rule files? I want automate the process. We have SQL dim build for other dims, only this dim can be built from flat file also.
Or is there any other way to achieve this apart from using sub vars? I can try store the 3 variables in a table and then use them to build the cube, but want to see if we can avoid creating one more interface.
Thanks.Actually using the values of subvars to build a dimension (which I believe is what you want) is a fun problem. Here's an (Oracle) example that would do that, without requiring any additional table or flat file:
SELECT 'FiscalPeriod' AS Parent,
CASE Level
WHEN 1 THEN '&CurrMonth'
WHEN 2 THEN '&PrevMonth'
WHEN 3 THEN '&PrevMonthMinusOne'
END AS Child
FROM Dual
CONNECT BY Level <= 3
Here's how it looks in the load rule SQL dialog, and the data prep editor:
It's fun because I've never thought about it before, but I don't actually recommend this - if you have other ETL going on in SQL I'd generate the values in a table / view there, and have a script that both updates the subvars and builds the dimension direct from that. -
How to use substitution variables in Microsoft Word using Hyperion Smart view
Can we use Substitution Variables in copy data points and refresh in Microsoft Word? I tried it and it does not work dynamically (copy data points only copies what was in excel cell at that point). It only copies the static value of that variable from that cell. I want to use it dynamically in Word so that if I change the value of that variable in Essbase, it is updated in Word upon refresh. Any idea??
We need this feature for reporting in microsoft word and keep using the data points every year (instead of copying the cells from excel over again)
Any help/suggestion is appreciated.
Thanksyou can't use substitution variables with copy data points. I had tried a while ago (post 111.1.2.1.102) and it wouldn't work. I checked with Oracle development and they said it I not available
-
How to compare substitution variable name to static member names (not data)?
Is there a way to write a BSO member formula that compares a substitution variable against the name of a static member (not the data value of the member)
For example, I have a BSO database that has the sub variable &CurrMth (which is set the real current month), and I am trying to use it in the Q1/Q2/Q3/Q4 member formulas
IF(&CurrMnth <> "Jan" AND &CurrMnth <> "Feb")
"Mar";
The intention of the above is: if &CurrMnth is neither Jan nor Feb, then the Mar value will be used. However, the system is actually comparing the values of &CurrMnth and Jan/Feb, rather than the names/text string of "Jan"/"Feb".
I have been looking around the tech references, but I was unable to find any functions that will compare the text strings of member names as they all appear to compare against the data itself.
Please let me know if there are any ways to compare the member names themselves in a member formula, not the data values.
Thanks!Thanks Celvin, that looks like it works!
However, I do need to do the same function in the equivalent quarter members in our ASO cube as well. Do happen know know if there's a similar MDX function I could use in the ASO cube to acheive the same result? I was using the following to achieve this in ASO (which obviously did not work):
IIF([Time Periods].[Jan] <> &CurrMth AND [Time Periods].[Feb] <> &CurrMth,
[Mar], -
How to setup substitution variable for CurrYr?
I am trying to setup substitution variable for Curryr. Can anyone provide steps to setup substitution variable?
ThanksAlso look Re: Update variables at this recent thread. JohnGoodwin highlights a good way to get this automated using a batch file
-
How to Update Substitution Variable
Hi All,
we are using Essbase 9.3.1.2. i am trying to create substitution variable using essbase console and i am getting an error as 1051082: substitution variable currmonth already exists however i have deleted all my substitution variables before creating them. When i checked in the backend using maxl i am able to see that the new substitution variable is created (*Currmonth*) however in console when i right click on the server --> edit -> variables i am not able see that variable that i have created.
Can anyone of you help me out...
regards,
Naveen.
Edited by: user12209997 on Sep 13, 2010 11:29 AMAre you sure you're not creating the substitution variable at say, the database level, but are then looking at the application or server level? Or the reverse?
What do you get in MaxL when you type:
display variable all ;
If you set a variable, can you use it in an Essbase retrieve through the Excel add-in? If yes, I'd say the variable really exists and it's EAS that is wrong. There's always the restart of the EAS service to try.
Regards,
Cameron Lackpour -
Hi,
I'm working with an APEX page template - 'One Level Tabs' in my application.
I have copied and extended this template to meet the requirements specified by the client by adding a background image on the page.Also I have added 5 regions on the page,each one with a backgroung image each.These images are all png format and are supposed to be transaparent revealing the background image of the page.However,when I ran the page I noticed that these region images appeared on a white background and did not show the image below.
Is there a way to modify the substitution variables such as #REGION_POSITION_02#,#REGION_POSITION_04#,#REGION_POSITION_05# ,etc. such that the images placed here appear transparent and reveal the back drop underneath?
Would appreciate it very much if anybody could throw some light on the matter.
Regards,
Priya JetleySo this is the kind of thing?
changed the html code in the body of that page template and specified and image as a background to the main html tablePlease post the HTML code (wrap in tags to format properly in the forum).
in the source of the region specified the '<img src' tag
This wouldn't give a background image, but place the image in the region content?
Png format I believe has the ability to be transparent by default.Correct me if I am mistaken.
PNGs can have full transparency set using binary transparency, or full or partial transparency set using an alpha channel. Do you know which has been used? Is transparency apparent when the images are viewed on their own?
Again you are recommended to upload a simple example of what you have done to apex.oracle.com. This is the fastest and most reliable way to troubleshoot this type of issue. -
How to use substitution variable in sql
Hai All
I have two tables Rgpmain and Rgpitem the fields are
Rgpmain
unitid,periodid, docno, vendcode ,vendname, part_taken_by and .....
Rgpitem
unitid, periodid, docno, partno, partname .... And i need to give some values in runtime using sub variable
i need to to four values in sub function and i will give one value and i need the result of one variable
The qurey will like this
Select * from rgpmain m, rgpitem i where unitid=1 and periodid=14 and m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendcode ='&p_vendcode'
Or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and vendname like '&p_vendname%'
Or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partname like '&p_partname%'
or
m.unitid=i. unitid and m.periodid= i.periodid and m.docno = i.docno and partno ='&p_partno'
This is my query
And while i am executing there are four options showing to enter..
My need is i need enter only one field Ie vendcode and execute the vendcode like ABC01 then i need the only
the result that belong to vendcode ABC01 but my query giving all the rows
Pls tell me what is wrong with my query
Thanks In Advance
Srikkanth.MHai
Thanks Man i under stood that nv2 if 1 col is null then it will return 2 col or els 1 col but i working with large
database and i need four or five column using sub. Pls tell whats went wrong with my query when i am executing
one by one at the first time its works fine but next time it returns 1000 rows. pls tell me how to use four or five columns
Regards
srikkanth.M -
How to use substitution variables in sqlplus activity of process flow
I have a process flow that does nothing more than create a couple of packages that I cannot successfully deploy from OWB. A workaround, not something that I want to do, but currently there is not much time to adjust the packages so they can be deployed from OWB.
I can successfully create the packages from files that are present in a directory on the server. But the location (directory) is not the same in all cases (OTAP). So I thought to use an input parameter to the process flow (named TELLINGEN) and use that in the sqlplus activity.
I have created the parameter START_PATH with a default value.
I have added an sqlplus activity and placed the following into the PARAMETER_LIST variable of the activity:
?${Target.ConnectString}?@${TELLINGEN.START_PATH}/npl_dbug.pkg?
When I run the process flow I see the following in the output:
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Mar 18 18:10:14 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SP2-0310: unable to open file "${TELLINGEN.START_PATH}/npl_dbug.pkg"
SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
It obviously connects to sqlplus but then cannot find the file. Presumably because the variable has not been substituted.
How can I persuade the activity to substitute the variable?
Kind regards,
Eric.Have been reading around a bit and found the (a) solution:
I placed the following in PARAMETERLIST:
?${Target.ConnectString}?@${Working.RootPath}/base64.sql?
And it turns out ${Working.RootPath} is pointing to the location you can provide under the configure for the sqlplus activity in the process flow. Just as you have to provide the target destination as indicated here: Re: SQLPLUS Activity in Process Flow
From the documentation it was not immediately clear to me where Working.RootPath was pointing to. -
How to call substitution variable from calculation script?
Use ampersand and variable name &varname
e.g FIX (&currMonth)
where currMonth is your variable
Cheers
John
http://john-goodwin.blogspot.com/
Edited by: JohnGoodwin on Mar 22, 2010 11:02 AM -
Hi ,
I have a substitution variable named curMonth and I set it to "Oct".
I want to use it in an if like
if(&curMonth == "Jan")
acc = calc1;
elseif(&curMonth == "Feb")
acc = calc2 ;
elseif(&curMonth == "Oct")
acc = calc10;
elseif(&curMonth == "Dec")
acc = calc12;
endif;
when I'm trying this the 1st condition is true so I have calc1 as result.
I changed it to many if... endif and i suppose that every condition was true because I found the last calc (calc12) as result in my account (acc).
Any ideas?
Thank you in advanceThere was another thread about comparing subvars to member names recently:
How to compare substitution variable name to static member names (not data)? -
How to use a substitution variable in a load rule?
I need to use a substitution variable in a load rule in a column, as I will receive a parameter to fix the Month and Year values within the data loading, could somebody tell me if this is possible. I put an expresion "&Yearproc" in the column value but it is not working.
If you're a member of ODTUG (or even if not, you can sign up for an associate membership for free) you can download Glenn's presentation from 2009 Kaliedoscope "Little Used Features of Essbase (Like Data Mining and Triggers)" -- there is a section in that presentation on substitution variables -- he does a really good job in showing how this works.
Go to: www.odtug.com, then Tech Resources, then Essbase/Hyperion, and search for Schwartzberg. Currently it's the ninth presentation on the list -- I think this changes based on popularity of downloads.
Regards,
Cameron Lackpour -
How to pass parameter [bind variable or substitution variable] to a view?
How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.
In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject?
Thank you in advance,
MB
What I can do:
CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
AS
SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
What I want to do:
CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
AS
SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);Blais wrote:
How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.Yes, there can be performance issues. Views are a form of dynamic SQL and it is hard to predict how they will perform later.
You can't pass parameters to a view. They are not functions. The mechanism to put the values in is what you mentioned, passing the parameter when you query the view.
In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject? This functionality is not supported.
What I can do:
CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
AS
SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
What I want to do:
CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
AS
SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);Include the bind value when you use the view in a SELECT. The value will be applied to the view at run-time, somthing like
CREATE VIEW "HR"."EMP_NAME_VW" ("FIRST_NAME", "LAST_NAME","EMPLOYEE_ID")(prmEMP_ID)
AS SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
select *
from emp_name_vw
WHERE EMPLOYEE_ID IN (:prmEMP_ID);To use EMPLOYEE_ID I added it to your list of columns in the view so it can be referenced in the WHERE clause. If you don't want to see that value don't select it from the view. -
How can I show the current value of a substitution variable in FR?
Hello,
I want to paste the current month in a text box using a substitution variable in my report. How can I use the Curmth sub-var in a text box? Which function would I use to paste the substitution variable. Thank you.
-- Adi
Edit:
The Sub-Var is not used anywhere in the report but it is in the database that the report accesses.
Edited by: Aditya26 on Apr 12, 2012 8:42 AMI think you can only reference items on the actual report.
It might be easier to pull the subvar into the report (on a hidden column/row) and then you can reference the cell.
Cheers, Iain -
How to get essbase substitution variable in ODI
Hi All,
I have a problem that I need to get the substitution variable from Essbase /EAS to work on some SQL statement in ODI.
How can I do in ODI ???
Thanks for all ..
ThomasHi,
If you read my blog post :- http://john-goodwin.blogspot.com/2009/11/odi-series-planning-11113-enhancements.html
In the post there is a section on retrieving essbase substitution variables and using them in ODI.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
My ISP has just installed a new modem with an ethernet connection, which I have plugged into my Airport Express. I'm able to connect to an open network in the neighborhood but not to my own network that I had set up before. I have done some trouble
-
I have two recurring issues with my Nokia E61 Issue 1: I cannot get my PC to sync with my E61, although it seems that I can intermittently get my E61 to sync with my PC (by using synchronise on the phone and not the PC) I am operating all the up to d
-
Connecting g4 power mac to g4 ibook firewire 400
I cant seem to get my powermac G4 to recognize when i restart my ibook so i can transfer my hard drive files to my powermac using the firewire 400 connection PLEASE HELP!!! tghe powermac g4 doesnt display the icon on the desktop and will not recogniz
-
XPS 12 (9Q33, Mid 2013) Laptop Screen Issue
The issue started occurring just few weeks before the end of warranty. My laptop stopped detecting the the internal screen in Windows. When booted to Windows with no other screen connected, the internal screen is blank. If the external screen is conn
-
Re : Run oracle DB packages from OBIEE
Hello there, Hope all is well. I was just wondering how do you run Oracle DB Packages from OBIEE ? How do I say EXEC package.procedure or package.function ? Thanks in advance, Sam