Real-time query build up

Say there are 10 fields that are a combination of combo boxes and text fields that represent different columns from multiple tables in the database. Based on the what the user chooses say either 1 , 1+2, 1+3+4 etc would mean different queries with a huge if statement.Plus I want to add only those statements that are filled in the GUI(& hence not null).
How do I do it?
A sample would be highly appreciated!

I haven't actually done this kind of thing before, but here's a suggestion off the top of my head. Why not sub-class the different components you are using and add methods like getSelectSql(), getWhereSql(), etc... Basically, you could call these methods on each component and the component would be responsible for returning the approprite SQL snippets (or nothing if it isn't part of the users query) which you would have to logically put together.
Just an off the wall thougth; I'm sure there are better ways of doing it.
Jamie

Similar Messages

  • How to disable REAL TIME QUERY in DG 11gr2 ?

    Hi,
    With 11gr2, by default, on STARTUP, the standby database is open
    -> in READ ONLY mode
    -> with Intended State: APPLY-ON
    so the ACTIVE DATAGUARD option is in use ....
    is there a way to deactivate REAL TIME QUERY permanently,
    so whether on STARTUP or STARTUP MOUNT, the standby stay only mounted with Intended State: APPLY-ON
    The only way i found is to do the following :
    SQL> startup
    DGMGRL> edit database 'PHNXENT' set state='APPLY-OFF';
    then
    SQL> startup mount
    DGMGRL> edit database 'PHNXENT' set state='APPLY-ON';
    but this can leads to mistake ....
    Thanks

    it is for standalone database (not RAC)
    yes, users can start the database with mount option, but they have to keep in mind that they do not have to issue a "STARTUP",
    so it is a production rule that oracle doesn't handle.
    Second, it will give a little more complexity in startup scripts (first mount, identify the role, and then open if it is a primary.
    In 10gr2 just startup in all cases ....
    that's why i'd like to know if there is a possibility to permanently disable REAL TIME APPLY ...

  • Active Dataguard switchover puts new standby in real time query

    Hi Gurus,
    If using Active Dataguard ,after swicthover/failover using dg broker and observer does sthe new standby will be put in real time query mode(ADG) or manually have to open the db in read only mode.
    Please let me know.
    Thanks

    Yes it does:
    [uhesse]$ dgmgrl sys/oracle@prima
    DGMGRL for Linux: Version 11.2.0.1.0 - Production
    Copyright (c) 2000, 2009, Oracle. All rights reserved.
    Welcome to DGMGRL, type "help" for information.
    Connected.
    DGMGRL> show configuration
    Configuration - myconf
      Protection Mode: MaxAvailability
      Databases:
        prima - Primary database
        logst - Logical standby database
        physt - Physical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS
    DGMGRL> show database physt
    Database - physt
      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: ON
      Instance(s):
        physt
    Database Status:
    SUCCESS
    DGMGRL> switchover to physt;
    Performing switchover NOW, please wait...
    New primary database "physt" is opening...
    Operation requires shutdown of instance "prima" on database "prima"
    Shutting down instance "prima"...
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "prima" on database "prima"
    Starting instance "prima"...
    ORACLE instance started.
    Database mounted.
    Database opened.
    Switchover succeeded, new primary is "physt"
    DGMGRL> show configuration
    Configuration - myconf
      Protection Mode: MaxAvailability
      Databases:
        physt - Primary database
        prima - Physical standby database
        logst - Logical standby database
    Fast-Start Failover: DISABLED
    Configuration Status:
    SUCCESS
    DGMGRL> show database prima
    Database - prima
      Role:            PHYSICAL STANDBY
      Intended State:  APPLY-ON
      Transport Lag:   0 seconds
      Apply Lag:       0 seconds
      Real Time Query: ON
      Instance(s):
        prima
    Database Status:
    SUCCESSKind regards
    Uwe Hesse
    http://uhesse.wordpress.com

  • Syntax error in programme on a real time query

    Hi all
    I have created a programme which sits on a real time cube which then sits on an aggregation level and the query that sit on it now comes up with the following error.  I removed a key figure which i did not need and it has been removed in all areas but when i run the report it is still picking up.
      Syntax error in program "GPD637MUU0BR3GW81HQGROKQ8DB ".
    at happened?
      Error in the ABAP Application Program
      The current ABAP program "CL_RSR_REPORT_CHECK===========CP" had to be
       terminated because it has
      come across a statement that unfortunately cannot be executed.
      The following syntax error occurred in program "GPD637MUU0BR3GW81HQGROKQ8DB "
       in include "GPD637MUU0BR3GW81HQGROKQ8DB " in
      line 206:
      "The type "/BIC/OIZ2E_NETUN" is unknown."
    What is the table/ programme that i can remove GPD637MUU0BR3GW81HQGROKQ8DB so that it will regenerate with the new changes.   Any help will be appreciated
    Thanks

    Programs starting with GP are Generated Programs.
    Could you maybe specify your example a bit clearer:
    I have created a programme which sits on a real time cube which then sits on an aggregation level and the query that sit on it now comes up with the following error. I removed a key figure which i did not need and it has been removed in all areas but when i run the report it is still picking up.
    When you talk about a program on a real time cube, what do you mean? Do you mean a query?
    You can try to resave and afterwards regenerate the query in RSRT.

  • Real time query

    What are some function that I can use to get real time data from the mysql database?
    I wanted to made a program that will receive a update whenever the database gets updated.

    okay, there is some delay.
    But I just needed the program to show the new item that was added to the database on the program.
    I'm writing a program that had multiple user that if one user add an item to the database, other users will be able to see without doing anything.
    I know the query can get the data from the database, but how can I continuously getting new database to my program?

  • How Real Time Apply works while physical standby is open in Read Only mode

    Hi,
    With Active data guard option, we can open physical standby DB in read only mode, while redo log are being applied. (Real Time Query)
    Standby Redo log (SRL) enables Real Time Apply (with "USING CURRENT LOGFILE" clause in recover database command on standby DB)
    I am interested to know, how Real Time Query works ?
    What is the mechanism with allows us to open physical standby DB in read only mode while redo logs are being applied continuously ?
    Regards,
    Sujit

    Dear user7419391,
    That is a new feature in Oracle Database 11g. MRP can use the real time apply in 10g but the concept here is different.
    Taken from the following document;
    http://www.ascent.co.za/documents/oracle/Oracle%20databse%2011g%20Active-Data-Guard%20datasheet.pdf
    *Unique Advantages of Oracle Active Data Guard*
    +Active Data Guard is an evolution of Data Guard technology, providing unique+
    +performance advantages while leveraging all other enhancements included in Oracle+
    +Data Guard 11g. For example, any Data Guard 11g physical standby database can+
    +be easily converted to a Snapshot Standby. A Snapshot Standby is open read-write+
    +and is ideally suited as a test system, able to process transactions independent of the+
    +primary database. A Snapshot Standby maintains protection by continuing to receive+
    +data from the production database, archiving it for later use. When tests are+
    +complete, a single command discards changes made while open read-write and+
    +quickly resynchronizes the standby database with the primary.+
    The other link in the previous post is excellent and you really have to read it to understand the active data guard aspects.
    Regards.
    Ogan

  • Enabling the Active Dataguard and Real Time Apply

    11.2.0.2 on AIX
    I gather that , to enable Active Dataguard, you need to execute
    STARTUP ; ----not startup mount
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;The above commands will enable both Active Dataguard (Real Time QUERY) and Real Time Apply. Right?
    To enable just 'Real Time Apply' , I need to
    startup mount
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;Am I right ?
    Question on 'WITH SESSION SHUTDOWN' clause
    While googling I've come across the following variant with an additonal 'WITH SESSION SHUTDOWN' clause
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE WITH SESSION SHUTDOWN;What difference does this clause bring ?
    Is this claused used to enable Active Dataguard feature or 'Real Time Apply' or both ?

    I gather that , to enable Active Dataguard, you need to execute
    STARTUP ; ----not startup mount
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
    The above commands will enable both Active Dataguard (Real Time QUERY) and Real Time Apply. Right? Yes, It will be in both recovery / realtime + Read only mode, Also you can use
    To enable just 'Real Time Apply' , I need to
    startup mount
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;Am I right ?Yes. It will be in just recovery/real time mode.
    Question on 'WITH SESSION SHUTDOWN' clause
    While googling I've come across the following variant with an additonal 'WITH SESSION SHUTDOWN' clause
    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE WITH SESSION SHUTDOWN;What difference does this clause bring ?
    Is this claused used to enable Active Dataguard feature or 'Real Time Apply' or both ?It has multiple options based on startup type
    For this example check link of Julian Dyke.
    http://juliandyke.wordpress.com/2010/10/14/oracle-11gr2-active-data-guard/

  • To build 2 real time measures in RPD

    Hi,
    I want to know, how to build 2 real time measures in RPD by using Session and Repository Variables in the expression?
    With Regards,
    Sumedh

    Hi ,
    Is this an ODI question or OBIEE one ?
    For OBIEE , post your query in Business Intelligence Suite Enterprise Edition
    Thanks,
    Sutirtha

  • SQL Query for real time resource stats

    Does anyone know what the query would be to duplicate the real time resource stats page in version 8 or above of UCCX?  I need to build a custom web page that displays the same information.  I've got all the connectivity to the database just fine and can query it and display information.  Just can't figure out what the SQL would be that would extract that information.

     Michael,
    you can try :
    SELECT x.resourceName, t.eventType, x.datetime FROM (SELECT t1.resourceID, t1.resourceName, MAX(t2.eventDateTime) AS datetime FROM Resource AS t1 INNER JOIN AgentStateDetail AS t2 ON t2.agentID = t1.resourceID GROUP BY t1.resourceID, t1.resourceName ) AS x INNER JOIN AgentStateDetail AS t ON t.agentID = x.resourceID AND t.eventDateTime = x.datetime ORDER BY x.resourceName
    You will need to translate the eventType into the "readable" status like Talking or Not Ready with an IF or Case statement.
    Regards,
    Jeroen

  • How to copy data from a Input query to real time Infocube

    Hi All, I need some help on IP related stuff. The details are as below:
    I am using two real time infocubes and one Multiprovider on them.
    First Infocube u2018PRODUCTu2019  with the following Objects:
    Product Group ,Product,Region ,Fiscal Year , Fiscal Year Varient ,0currency
    Gross Sales
    Second Infocube u2018C_PRODUCT u2018 with the following Objects:
    Product Group ,Product,Region ,Fiscal Year , Fiscal Year Varient ,0currency
    Gross Sales and Forecast Sales
    ( u2018Forecast Salesu2019 in the extra object in the second Infocube. Remaining objects are same in the both the cubes)
    First Infocube  u2018Productu2019 has data but the second cube does not have any data.
    I have created a Multiprovider ZMulti and in that I have included these two cubes. On this Multi Provider, I have created a Aggrigation Level(The details of the aggregation level is provided in the next page).
    On this Aggrigation level  I have built a Input Query by which I run the report.
    (In the Rows area, I have taken Product Group, Product, Region and Fical year.
    In the Key Figure section, I have taken Gross Sales and Forecast Sales( which is part of the second Infocube C_Product). These two Key Figures are made Input as Input ready. And the Query is Input ready query. In the Filter, I have taken Fiscal Year Variant. )
    Data available in the first cube and no data currently in the second cube. Now executed the report and report displayed information from the first cube.
    EX:
    Product     Product     Region          Year     Gross Sales     Forecast Sales
    Group
    PG01           Beer           North           2008            10000           u2026u2026u2026
    PG01           Beer          South          2008          20000           u2026u2026u2026
    PG01          Beer          East          2008          15000           u2026u2026u2026
    The second column is empty and there is no data for the Forecast sales Key Figure in the column.
    Things look OK till the above.
    Now based on the Gross Sales, I am entering  forecast Sales values and I need to save the entire record to the second cube.
    For this in the report, I have given the Forecast sales values in the second column and right clicked the mouse and form the menu which I got, selected the u2018SAVEu2019 Option to save the data. For some time, I can see u2018Processingu2019 message and later values at u2018Forecast Salesu2019 are disappearing.
    Data is not saving to the cube second cube.
    ====================================================
    Am I missing any thing?
    In the Query, Do I need to provide InfoProvider and restrict it to specific value?
    In the query, Do I need to include, 0currency object?
    Could you please guide me on this?
    =============================================
    Details of the Aggrigation level.
                I have created an Aggrigation Level ZAL_Prod  on MultiProvider.
                Selected all the objects and activated.
                In the Filter, I have taken 0Fiscal Year Variant  and saved it.

    Restrict Forecast sales to the Plan cube in the Query.
    that should fix it.

  • Unable to create an universe on a query based on a real time cube

    Hello,
    I'm trying to create a universe on a BEx query. This query is based on a multiprovider which consists of one standard cube and one real time cube. I'm unable to see this query in the designer. I do see an empty folder with the name of the multi provider.
    I can create an universe directly on this multiprovider.
    Are there any specific setting for real time cube or is it a compatibility issue? Can an universe be created on a real time cube?
    Regards,
    Sameer

    Hi Sameer,
    Let me know if this SAP note helps: 1291966 - "Output Cache Directory" & "Enable Real Time Cache" options in Central Management Console

  • Need your help !!! -- Authorization error for Real-Time Bex query

    Dear experts:
    I have a Bex query built on a multiprovider, this multiprovider is consist of one standard cube and one real-time cube(virtual provider). When I run this query, I can retrive the data and no error occured, but when others execute this query, they will get the error message below:
    Operation Generate a Request could not be carried out for DTP DTP_D7JVT8DGBQWPWL13VIUITNODG
    You do not have authorization for the data transfer process
    Errors occurred during parallel processing of query 2, RC: 3
    Error while reading data; navigation is possible
    Row: 54 Inc: WRITE_MESSAGES Prog: CL_RSDR_AT_QUERY
    I used tcode rsecadmin to track the authorization, when I execute as user XXX, I can get the same error above, but when I go to "Display Log", no error showed there.
    Did anybody meet the same error before? How to resolve that?
    Any post would be appreciated and thank you all in advance!
    Tim

    I think there is some missing authorization,here
    the user has no access to execute the DTP.
    You can analyse it in rsecadmin or also see
    which object you are getting in su53.
    Thanks,
    Saveen

  • How to get last Build date of a dll in the real time target

    Info On My Project    
       I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...  
    I am facing some problems while checking Build date of my Application file( .dll)
    I have tried to use GetFileDate API. But it is not supporting for realtime Target..
    So i have tried __DATE__ macro.. That also having some problems..
    How to get last Build date of a dll from the real time target  ??
    Please Help to solve this....
    Thanks
    Vaishakh A  K

    Please reply if any one have suggestion...

  • Attempt to build real-time application failed

    When I try to build my real-time application in order to deploy it to a crio device, it fails. I can run the program just fine by opening it and clicking run. It can deploy and run all day that way, but it needs the computer that way too. So I need to be able to build and deploy it. When I do a build preview it completes just fine with no errors. I have set the program I want to start up as the startup and my subVIs virtual folder under always include. This is typical procedure for deploying projects to the crio.
    When it crashes I am getting an error:
    The build was unsuccessful.
    Possible reasons
    An error occurred while saving the following file:
    C:\Program Files\National Instruments\LabVIEW 2009\vi.lib\rvi\ClientSDK\Core\ModuleGeneration\CommunicationInterfaceUtility\niFpgaDmaChannelImplementation.ctl
    Invoke Node in AB_Source_VI.lvclass:Close_Reference.vi->AB_Build.lvclass:Copy_Files.vi->AB_Application.lvclass:Copy_Files.vi->AB_RTEXE.lvclass:Copy_Files.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_RTEXE.lvclass:Build.vi->AB_Build.lvclass:Build_from_Wizard.vi->AB_UI_Frmwk_Build.lvclass:Build.vi->AB_UI_FRAMEWORK.vi->AB_CreateNewWizard_Invoke_CORE.vi->RTBUIP_CreateNewWizard_Invoke.vi->RTBUIP_CreateNewWizard_Invoke.vi.ProxyCaller
    <APPEND>
    Method Name: <b>Save:Target Instrument</b>
    I put in a service request (Reference#7259553) but I am just not getting help fast enough. I am on a real deadline here and I just sort of expected the application builder to work like it has always done. I have done this a million times with other applications and never had an issue like this. 
    Thanks in advance for your help guys.
    [will work for kudos]
    Solved!
    Go to Solution.

    With the fantastic help of applications engineer Will Schoettler, we were able to solve the problem.
    1. First we tried creating a new project file from scratch, adding all the files and compiling the fpga. Same error.
    2. Next we made individual builds deploying each subvi individually to see if one of them was causing the error. Each built without a problem.
    3. I tried to create a new build for the main crio program and tweek the settings. Instead of manually adding the subvi and variable library folder to the 'always include' section of the build option, I simply added the main VI to the startup programs list and was going to let LabVIEW figure out which VIs to add. For some reason this gave me a more verbose error explanation and gave the following reason as the last sentance in the error explanation
    "Due to operating system limitations, LabVIEW cannot create the folder because its complete path contains too many characters." 
    I moved the project folder to c:/ , fixed the broken references in the project, and it built the VI and deployed it just fine.
    The builder creates a directory with a really long path name within your project folder, so if you have your project folder deep in your directory tree it will attempt to create files with paths too big for windows to handle.
    Mad Kudos to Will Schoettler the app engineer for such a potent and thorough troubleshooting task list of things to try that lead me straight to the solution. I am glad it was something so simple and not some form of file corruption or something wrong with my code. 
    Thanks for trying to help guys.
    [will work for kudos]

  • Error building source distribution of a project containing real-time utility VIs

    I'm using Labview 8.0.
    When building the source distribution of a project I get the following message:
    An error occurred while building the following file:
    C:\Program Files\National Instruments\LabVIEW 8.0\vi.lib\real-time\rtutility.llb\FPC pad/strip string to size.vi
    I'm using "RT reboot controller.vi" and "RT ping controllers.vi" in the project.
    Anyone can tell me how to solve the problem?
    Is it correct that the filename of a VI contains the character "/"? (FPC pad/strip string to size.vi)

    Hi!
    You fall in a LabView library error..sorry.
    As you have imagined the problem is the slash in the filename and to solve you have to remove it. Go to ..\National Instruments\LabVIEW 8.0\vi.lib\real-time\rtutility.llb and rename the file.
    Let me know if this solve.
    Ciao
    Clara
    AE Manager
    NI Italy

Maybe you are looking for