Default presentation variable used in the SQL filter expression

Hello
I am trying to use a default value for a variable used in a sql expression in a filter presentation and could use assistance on why obiee stifles the syntax.

I have a report prompted with a prompt on the name of the month (variable presentation framework - pres_month_name). The value read is used in a filter as an sql expression. The sql expression is a DEAL on the variable of presentation and its conversion to a number based on business rules.

In the sql expression, I give you the presentation variable a default value for a variable of repository - rep_default_month_name. Repository variable is correct and no, based on business rules, returns an appropriate default month name.

Now, if I hard code the value by default, there is no problem. Here is a sample of the filter:
The month number less than or equal to * DEAL "{pres_month_name} {OCT}" WHEN "NOV" THEN 10 WHEN... END *.

Notice that the variable of presentation is between single quotes, because this is an area of character. Once more, it works fine, but I don't want to hardcode the default, I want it based on the variable repository, therefore:

The month number less than or equal to * DEAL '{pres_month_name} {ValueOf (rep_default_month_name)}' WHEN 'NOV' THEN 10 WHEN... END *.

By having this syntax for default of the variable of the presentation, I receive a message from the incorrect values in a filter.

This report is not only used on a dashboard, but used in a briefing book as well. Whenever a briefing book is updated, by default the presentation variable is used, because obviously, the presentation is not available in a briefing, and I don't want to use a hard-coded value.

I could duplicate the report and adjust the sql to not use the presentation variable, but always use the repository variable that returns a month by default, but I would be duplication of effort and I have to do this on several requests.

Thanks for the help!

Try this syntax described in the blog of Shiva that follows...

http://shivabizint.WordPress.com/2008/10/02/Oracle-BI-EE-variables-overview/

Tags: Business Intelligence

Similar Questions

  • Hi whant to update the changed value to dishes of the same variable used in the entry. How to do thanks in advance

    Hi, I want to update the value out put of the same variable used in the entry. How to do thanks in advance

    ya I got it. using the property node (and if you select value) we can do. Thans for answer

  • Using a Variable to create the SQL query

    I need to create a "dynamic" update query I want to hold the meeting of the command in a variable and then refer to the query variable.

    Example:

    < cfquery name = "fred" datasource = "mydb" >
    Update db_table_name set
    PBname = "Fred Flintstone",
    pbnumber = ' 555-555-1234. '
    pbage = 25
    where recnum = 24
    < / cfquery >

    I would like use this code:
    < cfset upst = "pbname ="Fred Flintstone", pbnumber =' 555-555-1234, pbage = 25" > ".
    < cfquery name = "fred" datasource = "mydb" >
    Update db_table_name set
    #upst #.
    where recnum = 24
    < / cfquery >

    When I run the present, I get the following error message:
    Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] syntax error (missing operator) in query expression "Fred Flintstone".

    The SQL is:
    Update db_table_name set pbname = "Fred Flintstone", pbnumber = "555-555-1234", pbage = 25 where recnum = 24

    I know it's hard to see, but the "are 2' No 1". I have no idea why Coldfusion (or perhaps the ODBC driver?) puts the 2nd "in the command that causes the errors.

    Anyone can shed some light on this subject?

    While it is a simple example, my application is much more complex. I have over 50 fields in the update and based on changes to the values of the form, I may need to update all fields, some fields or NO fields.

    Can I use < cfif > test if all the fields have changed and if so, include them in the update command, but if NONE of the fields have changed, I update the command vacuum and therefore get an error. I want to avoid having to test changes twice (once to determine if I do the update and twice to perform the update).

    Thank you
    Mike.

    CF automatically escapes single quotes, he must preserve them


    Update db_table_name set
    #PreserveSingleQuotes (upst) #.
    where recnum = 24

    Ken

  • With the help of sql filter expression

    Hi Experts,

    I have a question using "sql expression" in the filters in the responses. Let's say I have a date filter and I wish that the value for this date as max (tablename.colname). Please tell me the syntax for this passage.

    Another issue is that I have a date guest data are updated every week we'll tell the data refreshed like this * 01/08/11, 08/08/11 and 15/08/11 *. Now, if I select the 08/08/11 it will display the data
    populated on * 08/08/11 * which is ok, but if I select * 09/08/11 to 14/08/11 * it only shows * 08/08/11 * data. Similarly, if the option * 16/08/11 or 16/09/11 * it should show the latest up-to-date data which is * 15/08/11 *.

    Thanks in advance.
    Chak

    OK, if that State is limited as of the last update when your selects a date in guest that is beyond / above the last refresh date.

    This can be a way to do as below:

    – Enter the last updated date in a variable repository. If this variable will always hold a value for the last date discount.
    -In guests, capture the date selected by the user in a variable of presentation and to apply the Sub statement in SQL advanced report.

    DateColumn = case when Timestamp ' @{RBAP} {2011-01-01 00:00:00}'<= valueof("lastrefdate")="" then="" timestamp="" '@{pvar}{2011-01-01="" 00:00:00}'="" else="" valueof("lastrefdate")="">

    RBAP following your presentation and lastRefDate var is your variable rep containing the last refresh date. What would this statement, if the user selects a date that is less than equal to the last refresh date, then report is filtered from this date. Otherwise, the report will be filtered by the value of the date of the last update.

    Thank you

  • Change the sql filter code trade name

    All,

    one of my filters is a "Term" Advanced sql code "' Code word ' = VALUEOF (NQ_SESSION. CSA_Analysis_Term)
    When I add the filter to the report (add a filter) the user does not understand the code above,
    and I can't seem to find a way to add a name to make it more useful to users.

    anyone tried it with that

    Thank you

    I see your problem...

    When you have used this session variable in filters part you are able to see the session instead of the value variable last rite?

    You have guest of dashboard set to "Term". "' Term Code ' to the dashboard page?
    If so, why by default the session here filters variable part of the report? by default it prompt default dashboard section...

    just say guest is on the code term column in your report

    Published by: Kishore Guggilla, November 29, 2010 23:38

  • ResetOvFlw does not have to reset all the overflow variables used on the form.

    I have a form which is repeated twice in the same transaction to has a section where I used "IncovSym" to increment/capture the variable overflow and the same is used to display the data in the section. On the first occurrence of the form, the variable of overflow is set to for example 1 (such as initialization), based on the case. In the second instance of the form is running, the variable must begin with 1 as the initialization. Instead, it increments the variable to 2. I tried to do a reset of all the variable overflow, but it doesn't seem to work. Please let me know if you have a solution to this.

    File JDT

    < rules >

    ; RULStandardJobProc; 1; Always the first job level rule;

    ; SetErrHdr; 1; * : ;

    ; JobInit1; 1;

    ; LoadDDTDefs; 1;

    InitOvFlw; 1;

    ; LoadTextTbl; 1;

    ; BuildMasterFormList; 1; 4;

    / * Each form in this basis use these rules. */

    < regulations of basic form >

    ; RULStandardTransactionProc; 2; Always the first transaction level rule;

    ; USEXMLExtract; 2;

    ; LoadExtractData; 2;

    ; ResetOvFlw; 2;

    ; LoadRcpTbl; 2;

    ; UpdatePOLFile; 2;

    ; RunSetRcpTbl; 2;

    ; LoadGlobalFonts; ACCA;

    ; BuildFormList; 2;

    ResetOvFlw is a level transaction set in the AFGJOB rule that works under the direction of 'post' message In other words, function after having been triggered all forms and all mapped sections. Essentially, you can think of as 'now that this transaction will occur, reset the overflow before starting the next transaction'.

    If you need to reset a particular variable debordement overflow during the process, search for the rule level section named ResetOvSym. This rule would be defined in the section properties and name the symbol of infinity special you want to reset.

  • Use of the SQL Server Agent

    Hello

    Lack of VMWare VirtualCenter Server 2.5.0.64207 on a Windows 2003 R2 SP2, SQL Server 2005 System. It is the only significant application on the system, and VirtualCenterDB is the only database.

    We see that the system is running very slowly, both regarding the response time in the Console of the Infrastructure of VMWare and the response time for all other programs that you happen to run. For example, the MMC administration tools take a long time to start or respond to clicks.

    PerfMon shows fairly low CPU usage, but the queue of average drive about 170.

    However, the problem disappears if we stop the SQL Server Agent service. The average disk queue goes down to about 2.

    I don't want to always leave the SQL Server Agent is turned off, because it is necessary to perform periodic maintenance. Is there a way to tell why the readers of SQL Server Agent use so much disk space?  Given that VirtualCenterDB is our unique database, I suspect that the problem is specific to VMWare.

    Thanks in advance for your suggestions.

    These jobs move data from system of VPX_HIST_STAT1 to VPX_HIST_STAT2 then VPX_HIST_STAT3 then VPX_HIST_STAT4 and finally remove the data from your database.   These tables to the expectations of the performance data for your hosts and virtual machines and jobs here correspond to the data of the basic performance levels than your game in the VI client when connected to your vCenter server.  It is important to keep these tasks to make sure that your weekly, monthly and annual data are properly maintained.

    You have a database maintenance task that rebuilt the index?  If this isn't the case, then it is perhaps probably caused performance issues.  Without up-to-date indexes, SQL Server will be compelled to resort to analysis of tables when looking for data that can significantly increase the disk i/o.

  • OSB - How select variable used in the routing for buss request message. serv.

    I have "modeling of a stream of messages to a proxy service.
    According to the content of the incoming request message, a (conditional) branch is selected. The message must be routed to a business service in this branch.
    This service of the company has a different message definition requires that the proxy service. A kind of transformation is probably necessary. (not yet implemented)
    Question is how to choose what variable structure (I created a variable of Interface Service for business) that will be used during the call to the sales department.
    Only thing that I can choose, the service and operation.

    How to continue?

    The payload for the service of the company must be in the * variable $body. There are also other variables pre-defined as $header and $attachments that could make sense if your need to send SOAP headers or accessories for business service.

  • How to create the SQL filter using XQuery FLWOR

    It is possible to create such a FLWOR expression that will be pushed down to SQL uses 'IN SQL"filtering?

    Assuming that the following function declaration:

    declare function tns:filterOnLevels($levels_as_xs:double+) {...

    I would like to create FLWOR expression that will be pushed down to this SQL:
    Select * from LEVELS where level IN ($levels)

    And tns:filterOnLevels (1,2,3) should run statement with ' where level IN (1,2,3). Type SQL filtering owe be lowered to SQL, because the execution of the query without constraint could train with too many records.

    This expression is possible to do in XQuery/XQSE or perhaps other extensions of fn - bea?

    I'm working on ODSI/Workshop 10.3 and Oracle 10 g.

    ODSI uses multiple GOLD instead of IN because optimizers (1) rewrite 'IN' as several GOLD anyway. and (2) OR is more general than 'IN,' since 'IN' can handle that (a) equal; and (b) a single multiple-column, while GOLD can also manipulate inequalities and several columns.

    In your example...

    declare function tns:filterOnLevels($levels_as_xs:double*) {(: use ' *' instead of '+' here, the optimizer will appreciate :))}

    for $l in $levels
    for $LEVELS in LEVELS()
    where $LEVELS/LEVEL = $l
    return
    $LEVEL

    If you look at the generated query plan, it should contain...

    SELECT = from LEVELS including LEVEL? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =? LEVEL or =?

    http://download.Oracle.com/docs/CD/E13162_01/ODSI/docs10gr3/XQuery/sql_pushdown.html#wp1134043

    Integrator of data services (the announcement of best practices).

  • Why DECODE can be used in the sql statement

    Hello

    Why not works sql1 but sql2.

    decode (1,0,0,1) Select SQL 1) in the var of the double;

    SQL 2) var = decode (1,0,0,1);

    Please specify.

    Kind regards

    Kishore

    decode has been implemented by Oracle to allow "if then else" type determination in SQL statements.

    It was not necessary in PL because PL already had if THEN ELSE as part of the language.

    Since that time became a standard ANSI for SQL, this CASE is now implemented in SQL and PL

    It's just the way it is.

    Your other does not work because it is the PL code, not a query SQL, and DECODE only exists in SQL.

    You'd better stop using DECODE and start to use the CASE instead.

  • Input record Input TextBox in variable, using in the text box on another frame

    Hello

    Have tried without success to save user input in an input text box, save in the variable and use this variable to fill in an area of dynamic text on another frame.

    First image:

    var a:String;
    var b:String;
    var c:String;
    aName1.addEventListener(Event.CHANGE, inputCapture1);
    function inputCapture1(e:Event):void{
    a = aName1.text;
    }
    bName1.addEventListener(Event.CHANGE, inputCapture2);
    function inputCapture2(e:Event):void{
    b = bName1.text;
    }
    cName1.addEventListener(Event.CHANGE, inputCapture3);
    function inputCapture3(e:Event):void{
    c = cName1.text;
    }
    
    

    Then on another frame (later)

    dynamictextbox1. Text = a;

    And so on, on the other images.

    So far crushed the overview of debugging. If I take the script on the first image and setting later, not crash.

    Any help appreciated.

    You must have the layer with the code above, extended until the frame later so that these variables are available here.

  • filtering "created the" date of the use of the SQL Expressions

    Hello!

    I want to build a filter for opportunities "created the" date.

    I need to find out all the tender have been created at the point of lead more than 30 days ago.

    I tried:

    Created to date is not equal to, or is not:

    (1) NOW()

    (2) TimeStampAdd(SQL_TSI_DAY,-30,CURRENT_DATE NOW())



    I get an error message.

    Any help is appreciated.

    smjohn had the correct idea.

    If you use the historical subject of the Oppty box, use the following form:

    TimeStampDiff (SQL_TSI_DAY, opportunity. "" Date of creation ", VALUEOF (NQ_SESSION. CURRENT_DT))<=>

    If you can provide the exact error, it would be really useful.

  • Speed distance tune-up to the brightness filter expression

    Hi I would like to create an expression that connects the rate at which the focal length of the camera shifts to a brightness filter.

    Thus, for example, if the focal length changes suddenly and quickly, I want an image to get proportional to how fast the focal length changed brighter suddenly. Conversely, if the speed at which the focal length changes is slow, there should be very little change in brightness of the image.

    Better yet, if you could tell me how to make the changes in brightness lag by about one second after the distance of development changes took place, that would be great!

    Thank you very much!

    I forgot to negative speed. This should fix this problem:

    atten = 20;

    delay =. 5;

    C = thisComp.layer ("camera 1");

    Math.ABS (C.cameraOption.focusDistance.speedAtTime (Time-delay)) / wait

    Your second question requires a more complicated expression. The expression would be a backward loop, frame-by-frame to determine how long the latest transition in the focal distance is produced or use this time to lead a kind of pulse for the brightness in decomposition. Sounds like fun - I would like to have time to get out to you.

    Dan

  • Unable to connect to the SQL 2005 Express database

    I'm new to Flex and I try to use the application for creating the database wizard and I am not able to connect to one of my servers MS SQL or PostgreSQL. I get this error message:

    java.sql.SQLException: unknown server host name "10.40.213.80\SQLEXPRESS".
    to net.sourceforge.jtds.jdbc.ConnectionJDBC2. < init > (ConnectionJDBC2.java:364)
    to net.sourceforge.jtds.jdbc.ConnectionJDBC3. < init > (ConnectionJDBC3.java:50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
    to org.eclipse.datatools.connectivity.db.generic.JDBCConnection.createConnection (JDBCConnect ion.java:87)
    at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection (DriverCo nnectionBase.java:104)
    at org.eclipse.datatools.connectivity.DriverConnectionBase.open (DriverConnectionBase.java:53)
    to org.eclipse.datatools.connectivity.db.generic.JDBCConnectionFactory.createConnection (JDBC ConnectionFactory.java:52)
    to org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection (Co nnectionFactoryProvider.java:77)
    at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection (Link Profile .java: 354)
    to com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnectionSimple (BaseCo nnectionProfilePage.java:70)
    at com.adobe.datatools.derived.wizards.BaseConnectionProfilePage.testConnection (BaseConnecti onProfilePage.java:51)
    to org.eclipse.datatools.connectivity.ui.wizards.ConnectionProfileDetailsPage$ 1.widgetSelect ed(ConnectionProfileDetailsPage.java:85)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    to com.adobe.flexbuilder.dbwizard.ui.DbWizard$ 8.widgetSelected(DbWizard.java:598)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at com.adobe.flexbuilder.dbwizard.actions.DBWizardAction.run(DBWizardAction.java:69)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
    at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionI tem.java:546)
    to org.eclipse.jface.action.ActionContributionItem.access$ 2 (ActionContributionItem.java:490)
    to org.eclipse.jface.action.ActionContributionItem$ 5.handleEvent (ActionContributionItem.java:402)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    to org.eclipse.ui.internal.Workbench.access$ 4 (Workbench.java:2219)
    to org.eclipse.ui.internal.Workbench$ 4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start (FlexBuilderApplication.java:112)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLau ncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.jav one: 76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    at java.lang.reflect.Method.invoke (unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
    Caused by: java.net.UnknownHostException: 10.40.213.80\SQLEXPRESS
    at java.net.PlainSocketImpl.connect (unknown Source)
    at java.net.SocksSocketImpl.connect (unknown Source)
    at java.net.Socket.connect (unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
    at java.lang.reflect.Method.invoke (unknown Source)
    at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:289)
    to net.sourceforge.jtds.jdbc.SharedSocket. < init > (SharedSocket.java:250)
    to net.sourceforge.jtds.jdbc.ConnectionJDBC2. < init > (ConnectionJDBC2.java:297)
    ... more than 57
    I activated local and remote connections on my server, I can connect to them using connections DSN on Windows and other applications of web development such as MS visual studio. Y at - it requires no special configuration as flex?

    Well I uninstalled my SQLEXPRESS and just installed an instance of SQL 2005 standard and enabled TCP/IP connections and ta - da! Don't know if there is something else in SQLEXPRESS which must be activated but it works not now.

    Thank you!

  • variable presentation in the SQL for the scale marker

    ! http://img101.imageshack.us/img101/3476/sqlscalemarket.PNG!

    Hi, experts,

    I want to know if variable presentation is supported in the "sql query" "scale marker.

    I want to move the selected value from the prompt for the sql query!

    Thank you!

    I want to know if variable presentation is supported in the "sql query" "scale marker.

    Scale marker made reference here to the axis scale to increase the width and height or the zoom layout data is dedicated to the see, it has nothing to do with the variable presentation as such. If you can not pass any value for the variable.

Maybe you are looking for