Replacement variable in the MDX script.
HelloAny body explain how to use substitution variables in the MDX Script.
here a single case:
IF (@ISMBR (& next) OR @ISMBR (& NextYear2))
'Budget NY'-'Budget '.
ENDIF;
Thanks in advance
CG Reddy
Try this one
When case ([Time]. CurrentMember) is & next or ([Time]. CurrentMember) is & NextYear2
then
[Budget NY]-[Budget]
end
Kind regards
RSG
Tags: Business Intelligence
Similar Questions
-
How to assign the variable in the SQL script?
I have the below running to generate the XML from the file.
I'm queue in the order of the coil, the output to a file named file1.xml. I invoke this SQL script from a shell script, I will pass variable association 3rd since the shell script which I want to use in the file ' & & 3'.xml. Help me set this variable to the DIGITAL field in this SQL script and how can I add to the command of the coil?set long 100 set pages 0 set trimspool on set serveroutput on set echo off set terminal off variable out CLOB begin pack.proc('&&1','&&2',:out); end; / spool /dir/loc/file1.xml select :out from dual; spool off
set long 100 set pages 0 set trimspool on set serveroutput on set echo off set terminal off variable out CLOB define var1='&1' -- to allow for more readable code define var2='&2' define var3 ='&3' begin pack.proc('&var1','&var2',:out); end; / spool /dir/loc/file&var3..xml -- note the substition variable has . appended print out spool off
------------
Sybrand Bakker
Senior Oracle DBA -
Calc the MDX script conversion script
Hello
We converted our cube BSO to ASO. so, we are now certain of our calc conversion MDX script.
SO I'll try the figute what can I use in MDX to FIX and DIM CALC commands in Calc script?
We use the EMP 11.1.2.
Thank youYou're not really converting them. There is not a procedure calc to ASO (Yes Cameron, I know that there but for the point of the question, that's irrevelent). As ASO cubes dynamically calculate the upper levels, there is no need of a Calc Dim statement. Some formaulas to work only on subsets of data, consider using a Case statement or an IIF statement. I find the case easier to read, but that's just me.
-
The use of variables in the Calc scripts and business rules
I'm sure that there have been previous discussions on this topic, but can anyone let me know the benefits of using variables in scripts of Calc and BRs?
Thank you
AI've never used variable Calc and after reading a guide to the study, which has talked about them, I didn't really understand the benefits.
^ ^ ^ I use variables all the time to make difficult abstract formulas. Here is an example.
/* Declare variables */ VAR varSalaryCosts ; VAR varProdOHLabXXXX ; VAR varXXXX ; A whole bunch of code here along with very limited FIX statement and then... "Salaried Labor" ( varSalaryCosts = "Salary Costs"->"No Department"->"No Category"->"Salaried" - "Wage Bonus"->"No Department"->"No Category"->"Salaried" - "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" - "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried" ; varProdOHLabXXXX = "Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" + "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" + "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" + "Number of Employees"->"TTTT"->"Codes"->"Salaried" ; "Salaried Labor" = varSalaryCosts * ("Number of Employees"->"Salaried" / varProdOHLabXXXX) ; )
The last formula is how the formula was described to me by the owner of the company. I find it much easier to read something like:
"Salaried Labor" = ("Salary Costs"->"No Department"->"No Category"->"Salaried" - "Wage Bonus"->"No Department"->"No Category"->"Salaried" - "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" - "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried") * ("Number of Employees"->"Salaried" / ("Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" + "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" + "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" + "Number of Employees"->"TTTT"->"Codes"->"Salaried")) ;
I used the TABLE in a calc script really-cool-but-alas-not-invented-by-me do better than planning made the conversion of currency currency conversion in planning. (How's that for a run-on sentence?) It is one of the six blog posts that I'm trying and I will end it soon, I hope. I am now thrash mode. It doesn't have its uses and I'll try to remember to update this thread when I'm done.
Kind regards
Cameron Lackpour
-
How to have a prompt for all variables in the startup script?
I was given a script to run that repeated a couple of specific column values many times in queries in the script. I noticed the ability to set variables in scripts, then in the copy of my script, I changed the value repeated a reference variable (starting with '&') and then I executed the script. What I discovered is that the execution of the script appears to present the prompt for the value of the variable EVERY TIME the done variable references, instead of only once at the beginning of the script. What can be possibly right? Is it possible to have this script the only guest (or two, perhaps, for two variables) at the beginning of the script and just have it use this value in the many places in the script need?Yeeees well. In the above example would be: Cancel the definition of entry
BUT, assuming you're sqldev (not), and that you run as a script (F5), you don't need to the above calls, and you will be prompted for the value of each race.
If you run instructions in sqldev (F9), usually, it makes more sense to use bind variables (*: * instead of * & *).Have fun
K. -
How to report the ip address resolved of nslookup as a variable in the batch script
I have a batch script that performs a constant audit 'external server' living every minute and the activity is fed into a log file. The external server is on a dynamic ip address.
for example,.
Logfile = C:\Logfile.txt
echo control myserver... > Logfile
.
.
[see document test/myserver.domain.com]
However, I would like to write in the log IP address that is being tested.
That is to say
the my_server checking to 123.456.78.9 echo
Could someone tell how can I get the dns to resolve address from "myserver.domain.com' as a variable in order, can I use it
for example,.
RESOLVED_ADDRESS = (nslookup resolution results)
the my_server % RESOLVED_ADDRESS % control echo
Thank you
Hi Jimimaseye,
I suggest that you post the application on Microsoft TechNet forum because we have experts working on these issues. You can check the link to post the same query on TechNet:
http://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w7itpro
Please do not hesitate to contact us if you have other questions related to Windows.
-
How to switch the input of command in the DAL script parameter
Hello guys,.
I want to pass the name to extract xml (one of the input for the batch of documaker parameter) to one of my trigger DAL.
I plan to use the Ext2GVM function for this. I need to know the syntax of the following parameters:
Say-exporter variable XMLNAME am for the batch.
(1) what should be of syntax for the AFGJOB file
Is this correct-> ; Ext2Gvm; 2; ParameterName = ~ GETENV XMLNAME ;
(2) what should be my entry in the trndfdfl. DFD
Is this correct->
< FIELD: parametername>
EXT_LENGTH = 21
EXT_TYPE = CHAR_ARRAY_NO_NULL_TERM
INT_LENGTH = 20
INT_TYPE = CHAR_ARRAY
KEY = O
REQUIRED = Y
FIELDNAME = parametername
(3) is it necessary to go into details as < Trn_Fields > in the ini files?
If so, please help me with sytnax
(4) final, how can I call this variable in the script DAL ?
Is this-> OK
Metafilename = GVM ('parametername')
Thank you
I reformulerai what I think you do.
You have a file name that you want to reference it in a script DAL. This file is NOT the snippet file should be able to use in the creation and mapping of your transactional data, but a few additional files that you expect to process directly from DAL.
If this is correct, two possibilities come to mind.
1. assuming it's a file that you can copy using your linux script, copy the file to a consistent name. Your script DAL can then use the code name hard you still copied.
2. a method that does not have a copy of the file would require that you create an environment variable of the linux script that contains the name of the file passed. In your INI, you must define your own INI, something like this:
Filename = ~ GetEnv MyExternalFile
The DAL script would do this to get the name:
xmlFileName = GetINIString ("MyINIGroup", "Filename");
When DAL is requesting the INI value, see the logic underlying the ~ GetEnv which is a built-in function to get the environment variable named following. So if you have assigned your script linux environment variables, the name going through now and DAL has a way to get it.
(Note there is no magic in the name of the INI option or group or the name of variable environment you choose to use.) The magic is to use the ~ GetEnv to retrieve the value of the environment when the option is requested.)
Second note, the GetINIString function has an optional first parameter to name a context INI. In this case, I do not pretend that you use this setting. Just include a comma to indicate that the first parameter is omitted.)
-
[JS, CS2] Is there a variable that contains the name of the calling script?
Hello
I need to have a script to get to know his own name.
It's because I have a situation where I have a find/replace routine to clean up and text style that I need to run on a few different types of stories (I work for a newspaper and they are in the sense of "default body copy," in the page","section of the arts", etc), but most of the routine of find/replace is the same for each of them. My colleagues should be able to have each of the routines to be in different scripts so that they can click on them. So I want each script specialist to have nothing in it but a statement #include that will be #include the text of a main entry. That way, whenever I have to make changes, I can't save as 1 million slightly different versions.
So if I need to be able to determine the name (or the path) of the script that has been called, then the script can then perform some necessary specialized actions for this type of story. Is it possible to do?
It would be something like the $argv php variable [0].
Thank you.
I don't think I understand what you mean by,
is it possible to pass parameters to the Indesign scripts directly (like the rest of the argv PHP array)?
Where these variables should come from? Please provide details.
You can send parameters to a script as in the following example (in examples of javascript)
DoScriptParameters.jsx
A JavaScript InDesign CS3
//
Shows how to send parameters to a script called for help
the doScript method.
var myParameters = ["Hello from DoScript", "Your message here"];
var myJavaScript = "alert (\"First argument:------"arguments [0] + \"\\rSecond argument: \ "+ arguments [1]);"; "
app.doScript (myJavaScript, ScriptLanguage.javascript, myParameters);
If (File.fs == "Windows") {}
var myVBScript = "msgbox arguments (1), vbOKOnly, \"First argument:------"& arguments (0) ';
app.doScript (myVBScript, ScriptLanguage.visualBasic, myParameters);
}
else {}
var myAppleScript = "say the application \"Adobe InDesign CS3_J\\rdisplay dialog box (\"First argument\ ' & point 1 of arguments & return & \"Second argument:------"& point 2 of arguments & return & end say" ';).
app.doScript (myAppleScript, ScriptLanguage.applescriptLanguage, myParameters);
} -
Hi community, I have a problem with script labview matab, I have this problem:
Error 1047 to LabVIEW: LabVIEW failure of sending variable to the script server. Server
Possible reasons:
LabVIEW LabVIEW: Cannot send the variable to the script server.
We have some documents that mention possible reason why this error occurs, you might see if either of the following apply to what you see.
http://digital.NI.com/public.nsf/allkb/8BEBC0C86541224286257AF300561B5E?OpenDocument
http://digital.NI.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53?OpenDocument
-
You can use variable substitution in the Calc script.
Hi guys,.
I want to use variable substitution in the calculation script. I v_SECSUBAREA that my substitution variable and its value would be like C12.00 or C13.00 or C12.00, C13.00.
But it gives me error mentioned below by checking the syntax of the calculation script.
Error: parsing formula [statement of DIFFICULTY] (line 15) 1200315 error: invalid object type
Calculation script:
-----------------------------
FIX (& v_CLEARYEAR, & v_CLEARMON)
FIX (& v_SECSUBAREA)
DIFFICULTY ('REPGBP', 'REPEUR', 'REPUSD', 'local', @DESCENDANTS ("DIVISION"), @LIST(&v_SECDNBENTITY), @DESCENDANTS ("SubAnalysis"),
@DESCENDANTS ("RTNROW"), @DESCENDANTS ("RTNCOL"))
CLEARDATA "RESUB."
ENDFIX;
ENDFIX;
ENDFIX;
Variable substitution:
----------------------------------
PRC COR_ALL v_SECSUBAREA C12.00 Calculation script does not have C12.00 as the value for the variable substitution. If I give FY15 then Script gives me a correct syntax.
Please help me to get this resolved.
Thank you
Shruti
Hello
Assuming that you calculate in the PRC. Database COR_ALL.
You may set the C12.00 value in quotes like "C12.00".
Kind regards
Philip Hulsebosch.
-
Should variable in the script to report
Hi all
We can use the substitution variable in the scripts of report as below
{ROWREPEAT}
{4 DECIMALS}
& v_PERout
Report scripts works well when there is that a single value in the variable as Jan, but the same failed when we spend 2 values Jan, Feb.
Please let me know where it is possible to accept a multiple value of variable in the script to report.
Thank you
Vikram
What exactly is the value of the variable substitution?
Don't forget that the substitution variable is simply "substituted" in the report as a text string - Essbase don't know or care that it's a list of members or whatever when he performs the substitution.
If you need proxy to look exactly as you enter these values when creating manually to a report, for example to your value...
"January", "February".
... or...
Jan Feb
-
Using the shell script sql variable
OS: Oracle Linux 5.10
DB Oracle 11.2.0
I have need to query the database and assign the return value to a variable of shell, but it does not work.
create table imr_env (key varchar2(1000), value varchar2(1000) ; insert into imr_env values('TblspcUsagePct','90'); commit;
Here is the shell script:
#!/bin/bash echo "in script" ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ; export ORACLE_HOME ORACLE_SID=IMR1 ; export ORACLE_SID export PATH=$PATH:$ORACLE_HOME/bin pct=`sqlplus -S app/manager <<END set serveroutput on declare output_val number ; BEGIN select value into output_val from imr_env where key = 'TblspcUsagePct' ; dbms_output.put_line('output_val: ' || to_char(output_val)) ; END ; / exit; END` ## another sqlplus connection, use $pct in the where clause echo "var value is $pct"
Here is the result:
SQL> ./test.sh in script var value is output_val: 90
Why isn't the shell variable is populated with the value retrieved from the database?
I need to use $pct in another query that will be storage spaces that are at least 90% full.
I had to change to a korn shell - I couldn't get the "READ" command in shell or bash.
But it is not only "READ" command:
SQL > select * from IMR_ENV;
THE KEY VALUE
------------------------- -----
TblspcWarningLimit 90
TblspcUsagePct 50
SQL > exit
Disconnected from the database to Oracle 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
$ cat test.sh
VAL = $(sqlplus-S test/test)<>
Set feedback off
set the position
Select (value) from imr_env, including the key to_number = "TblspcUsagePct";
Select (value) from imr_env, including the key to_number = "TblspcWarningLimit";
"exit";
EXPRESSIONS OF FOLKLORE
)
set $VAL
Echo $1
Echo $2
$./test.sh
50
90
$ echo $SHELL
/ bin/bash
$
-
How to assign the value to the variable of project in the Jython script
Hello
I want to assign a value to the variable of project in the jython script.
I tried to assign the following, but it is throwing some errors.
< @.
int noOfRecords = 10;
#var1 = noOfRecords;
@ >
Can you please help me in this regard.
Concerning
ShyamPerfect! Good to know that!
Please, don't forget to close the thread and assign the status to 'correct' or 'comfortable' to each response that helped you!
Thank you
Cezar Santos
http://odiexeperts.com -
Using the calculation script to write the value of the variable Substitution in a file
Hello
I am trying to use the calculation script to write the value of Substitution variable in a text file.
I use the dataexport command. But it is not able to write values in the text file.
Any help is appreciated.
Thank you.MaxL would display variable. See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/dispvarb.htm
BTW, I mostly prefer Esscmd MaxL. I think that makes me a heretic, but I don't understand why I don't want to type more rather than less to get the same result.
Running a calc:
Esscmd - RUNCALC 2 calcname
MaxL - run calculation Sample.Basic.calcname;To be fair, Esscmd requires a dbname appname SELECT before the RUNACALC, but it is always less striking.
However, time is running, so I don't have too. And of course, MaxL now has many things that Esscmd doesn't like Esscmd is obsolete.
I always use Esscmd to run scripts of calc I can actually watch the output in real time as opposed to MaxL that exports the console at the end of execution.
Kind regards
Cameron Lackpour
-
How to replace the variable with the help OF the operator?
Hello
I'm creating a form where the user selects the check box which products he wants to see. After the choice, I should show all sales of this product, but the selection does not recognize the variable after the IN operator, for example:
SELECT the product, price, quantity
FROM the sale
Product WHERE IN (vcProducts);
Can someone help me?
CreeI guess that vcProduct is a varchar2 variable where you have a chain of your prodids, as ' 4711,4712 concatinated, 4713'. May be you have each place value '. Is not the question, which is not part of the sql syntax set. You either have a list of enumeration or a subselect.
Where do you need it? In the block or Pl/Sql where clause.
In the latter case, you can configure the list in a variable (with enclosing "") and set the block where property.In the first of may by INSTR is useful, INSTR (vcProduct, vcDelim | table.prod_id | vcDelim) > 0. Make sure you have your list attached and separated by the vcDelim. If you prodct table with the number of lines (million), it can be slow because no index will be used.
Dynamic sql or.
Or write a subquery und temp-table.
Maybe you are looking for
-
Can I use my Portege R500-121 3 G for GSM calls
Hello I have TOSHIBA Portege R500-121 3 G. Can I use my TOSHIBA for GSM calls and if SO what software do I need? Thank you
-
How do I get the IMEI for my new IPad, so can I subscribe to the wireless service?
-
Where can I download drivers Windows 10 for my Aspire 4738?
I want to upgrade my Aspire 4738 Windows 7 Home Premium Windows 10 Home, but I can't find drivers for Windows 10. Any help? Please Thanks in advance
-
Failed to initialize the plugin QC9 adapters
I run ALM 12.10 in IE11, 64-bit (32 bits can not be launched on my computer), it throws the following error initializing phase on the splash screen plugin: Failed to initialize. Please contact system administrator for help. Description: Failed initia
-
New model 6700 printer, Windows 7, running wireless, "standby mode"
Printer 15 minutes "sleep mode". (hold that it was not a sleep mode option). When you try to print once he's asleep, an error screen appears indicating that the wireless printer is not connected. After waiting, the printer, sometimes turns on and pr