How to call SQL in the filter condition

Hi
Booking dashboard report i need to filter order_date between this Quarter starting date and this Quarter end date.
i have custom table data is available Quarter starting and Quarter ending date .
how i can use filter.
thanks

looks like you need to filter the order date between the quarter starting date and quarter ending date making sure order date is always present between the quarter start date and quarter end date
Create a sub report with one column order date and make order date is prompted.
So now in the main report use advanced filter option and
Take the quarter start date column and use advanced filter option on it. Use the filter results based on another request. You can specify quarter start date is greater than the selected order date(sub report order date column)
and
Take the quarter end date column and use advanced filter option on it. Use the filter results based on another request. You can specify quarter end date is less than the selected order date(sub report order date column)
This way you can force the order date always between quarter start date and quarter end date columns
Hope it helps
Thanks
Prash

Similar Messages

  • How to collapse the filter conditions

    Hi,
    We are displaying the filter conditions under each dashboards. But our conditions are around 10, so the user want to collapse them by defualt.
    if they want they want to expand and see the filters.
    Can any suggest how to achieve this.
    Also, during export to ppt they want the filter conditions also to be exported.
    thanks,
    Venkat.

    somisettyramana wrote:
    Hi,
    We are displaying the filter conditions under each dashboards. But our conditions are around 10, so the user want to collapse them by defualt.
    if they want they want to expand and see the filters.
    Can any suggest how to achieve this.
    Also, during export to ppt they want the filter conditions also to be exported.
    thanks,
    Venkat.This is what you should do:
    1) Ensure that the Filter View exists in your report.
    2) In your dashboard, drag TWO instances of your report in a section, one beneath the other.
    3) In the second (bottom) instance, click on the Rename button. Type "Filter View" and then check the "Use Dashboard..." checkbox. Click "OK."
    4) Click on the Properties button: Properties>Display Results>Link - In a Separate Window.
    5) Click on the Properties button again: Properties>Show View>Filters 1
    Now check out the dashboard. You will see a simple link that indicates the Filter View of the report without taking up any real estate on your dashboard. It costs you nothing extra and automatically updates when you modify your report.
    That's what you should do for dashboard reports.

  • How to call SQL Script in DBMS_SCHEDULER

    How to call SQL Scripts in DBMS_SCHEDULER?
    Things I got working
    1) Successfully created and tested a PL/SQL that was created under SQL Workshop->SQL Scripts (I named it 'TEST'). I was able to run this no problem.
    2) Successfully created a DBMS_SCHEDULER that runs every minutes. (See below)
    begin
      dbms_scheduler.create_job(
        job_name => 'myjob',
        job_type => 'plsql_block',
        job_action => 'null;',
        start_date => '19-JUL-11 03.10.00 PM', /* Remember to use the DB time, not your local time if not specifying a timezone */
        repeat_interval => 'freq=minutely',
        enabled => true);
    end;The problem i am having is to make the PL/SQL script (named 'TEST') runs every minute. Its probably very easy to do that but i dont seems like finding any examples online.
    I tried replacing the job_action attribute to " job_action => 'begin TEST; END;', " However, that did not work.
    I am stuck here for couple hours already, any clues would be great :)
    Thanks in advance
    John
    Application Express 4.1.0.00.32
    Edited by: John Lau on Aug 14, 2012 12:47 PM
    Edited by: John Lau on Aug 14, 2012 12:48 PM

    The PL/SQL is pretty long, I would like to call it from a different location rather then putting the whole coding as part of the argument. Sounds like I should be looking into procedure package in database?
    I will do some more research on procedure package, how to create one and how to call from it.
    Thanks
    John

  • How to use OMB to change filter conditions in OWB maps

    Hi,
    I want to know how we can use OMB to change filter conditions in an OWB map.
    As per my scenario i have a filter operator FLTR_1 in my maps and i have to change its filter condition from
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_0_MAX_VAL
    to
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_6_MAX_VAL
    Just for everybody's information we are migrating from OWB 9.2 to OWB 10.2 and we have called procedures in constants and used their values in filter conditions.OWB 10.2 generates the values for constants in a different way than OWB 9.2 thats why this change is required.I wish to automate the act of changing constant names so we can save time in changing the maps.
    Thx

    Carsten,
    I created a map in OWB 10.2 and ran the following command
    The filter operator name in this map is FILTER
    Carsten Herbe wrote:
    OMBALTER MAPPING 'TEST_MAP' MODIFY OPEARTOR 'FILTER' SET PROPERTIES (FILTER_CONDITION) VALUES ('INOUTGRP1.ID IN (1,2) AND INOUTGRP1.VALUE > CONST_6_MAX_VAL ')
    I got this error:
    OMB02933: Error getting child object of type OPEARTOR with name FILTER: MMM1034:
    Property OPEARTOR does not exist.
    Could you pls help on this.
    Thx

  • How to call SQL statements in InDesign CS6?

    Hi,
         My plug-in needs to interact with the database, and update the database content, how should I do, can I call SQL statements in InDesign CS6?
         Thanku very much.

    The same way you'd call them from any C++ program. You don't mention which platform, and that probably makes a difference.
    I'm accessing an SQL database in InDesign CS6 on Windows. I'm using the ODBC interface to SQL database that Windows provides, via the nanodbc wrapper. So I'm linking to odbc32.lib and odbccp32.lib, and including the nanodbc.cpp and nanodbc.h files. (See http://lexicalunit.github.io/nanodbc/ )
    Paul.

  • How to call SQL job step by step from windows batch file

    Hi ,
    I have a SQL agent job [POC_IOD_RunPkgJob]  which is being called from bat file with below command.
    Could you please tell me how to call only one step of this job, what command I need to mention in the batch file.
    SQLCMD -Sabcwi\SQLI01,51565 -E -Q"exec msdb.dbo.sp_start_job [POC_IOD_RunPkgJob]"

    Hi RameshDravid,
    Regarding your description,though not aware of what is the purposed to call only one step of that job, the below sample can somewhat help to achieve your requirement.
    --find the job steps
    SELECT
    steps.step_id,steps.step_name,steps.subsystem,steps.command
    FROM msdb.dbo.sysjobsteps steps
    JOIN msdb.dbo.sysjobs jobs
    ON steps.job_id = jobs.job_id
    WHERE jobs.name = 'youJobName'
    --find the command runs in that step, usually that is some command exec stored procedure
    SQLCMD -Sabcwi\SQLI01,51565 -E -Q"exec stored procedure found in the above query"
    If you have any question, feel free to let me know
    Eric Zhang
    TechNet Community Support

  • How to Call SQL Loader from Java ( servlet )?

    We need to call SQL Loader command from Java Servlets? Any suggestions how this can be done?
    Thanks
    Rahul

    Probably not the best way, but you could try using JNI to call a C function which then invokes SQL Loader via system() or exec(). I haven't done this myself though...

  • How to call SQL script from PL/SQL block

    Hi All,
    I have a pl/sql block from which i need to call a *.sql script file.
    Please tell me that how can i do this?
    Thanks and Regards.

    > Though just for knowledge sake, would you please tell if there is a way
    to call a sql script from a pl/sql block.
    This question stems usually from a confusion about client-server and which is which in Oracle.
    SQL*Plus is a client. PL/SQL is a server side language. SQL is a server side language.
    When entering either one of these two languages in SQL*Plus (or TOAD, SQL-Developer, etc), the content is shipped to an Oracle server process, is parsed there, and is executed there.
    The Oracle server process servicing the client can accept a single SQL statement or PL/SQL block at a time.
    It cannot accept a block of SQL statements delimited with a semicolon. That is a client concept where the client will read each delimited statement and send that, one after the other (in synchronous call mode) to the Oracle server for execution.
    The Oracle server does not have a "script parser". It understands SQL. It understands PL/SQL. And that is what it expects from the client.
    Whether the client supports the SET command, the HOST command, SPOOL command, ability to run scripts, and so... have no bearing on what the server itself is capable of doing. The server does not care what feature set the client has. It is tasked with servicing the client via SQL and PL/SQL.
    It is not tasked to support or emulate client features like running SQL scripts.
    Nor confuse PL/SQL with the very limited command set of SQL*Plus. The two has nothing in common. And just as PL/SQL cannot understand C# or Delphi commands, it cannot understand SQL*Plus commands.

  • Using sql in the filter expression

    For a project I need to use a filter which is a construction
    with BETWEEN dateFrom AND dateTo.
    But the user does not choose these datevalues,
    he chooses timePeriods which have a unique startDate.
    The dashboard prompts are populated with these timePeriods and the user chooses 2 of these and 2
    presentation variables are set.
    Now I need to retrieve the according startDate for a chosen timePeriod.
    I tried to do this using a sub-query in the filter expression,
    but this seems not to be valid in Answers.
    In standard SQL it is expressed like this:
    select table1.* from table1
    where table1.dateValue  BETWEEN
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue1')+
    AND
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue2')+
    The return of the subqueries are single row, as it should in such constructions.
    I want the where clause to be in the filter expression for the dateValue column in Answers.(trimming of the WHERE keyword)
    Is there any other construction that does this trick in the BI Answers/Dashboard environment to do this?
    Kind regards

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

  • How to use Prompts in the Filter created in Change Report Properties

    Hi all,
    I have created one Datetime prompt in Change report properties dialogue box.
    Now how can I use this same one in the filter ??
    Since I didn't get Surface and Prompt option for the Date field in the filter.
    Any help is appreciated.
    Thanks

    Actually problem is with Datatype..It was timestamp but it should be Datetime

  • How to call GET_SEARCH_RESULTS service in filter

    Hi Experts,
    I wrote a custom filter and in filter i am calling GET_SEARCH_RESULTS service. But i am getting following error :
    intradoc.data.DataException: !csNoServiceDefined,GET_SEARCH_RESULTS
         at test.notification.ExpirationNotification.executeService(ExpirationNotification.java:195)
         at test.notification.ExpirationNotification.doCustomDailyEvent(ExpirationNotification.java:112)
         at test.notification.ExpirationNotification.doFilter(ExpirationNotification.java:51)
         at intradoc.shared.PluginFilters.filter(PluginFilters.java:92)
         at intradoc.server.ScheduledSystemEvents.checkScheduledEvents(ScheduledSystemEvents.java:161)
         at intradoc.server.IdcSystemLoader$13.handleManagerEvent(IdcSystemLoader.java:2411)
         at intradoc.server.SubjectManager$1.run(SubjectManager.java:92)
    Here is the code :
    public class ExpirationNotification implements FilterImplementor
         public int doFilter(Workspace ws, DataBinder eventData, ExecutionContext cxt)
              throws DataException, ServiceException
              try{
              String action = eventData.getLocal("action");
              if (action!=null && action.equals("CustomExpNotifyEvent"))
                   doCustomDailyEvent(ws, eventData, cxt);
                   return CONTINUE;
         }catch(Exception e){e.printStackTrace();}
              return CONTINUE;
         protected void doCustomDailyEvent(Workspace ws, DataBinder eventData,
              ExecutionContext cxt) throws DataException, ServiceException
              update("CustomExpNotifyEvent", "CustomExpNotifyEvent event started...", ws);
              try
                   DataBinder serviceBinder = new DataBinder();
                   serviceBinder.putLocal("QueryText", "dOutDate > `<$dateCurrent()$>` <AND> dOutDate < `<$dateCurrent(30)$>`");
                   serviceBinder.putLocal("IdcService", "GET_SEARCH_RESULTS");
                        executeService(serviceBinder,"sysadmin",false);
                        ResultSet results= serviceBinder.getResultSet("SearchResults");
              } catch(Exception e){e.printStackTrace();}
              update("CustomExpNotifyEvent", "CustomExpNotifyEvent finished successfully", ws);
         protected void update(String action, String msg, Workspace workspace) throws ServiceException, DataException
              long curTime = System.currentTimeMillis();
              ScheduledSystemEvents sse = IdcSystemLoader.getOrCreateScheduledSystemEvents(workspace);
              sse.updateEventState(action, msg, curTime);
         protected void trace(String str)
              SystemUtils.trace("scheduledevents", "- custom - " + str);
         public static Workspace getSystemWorkspace() {
              Workspace workspace = null;
              Provider wsProvider = Providers.getProvider("SystemDatabase");
              if (wsProvider != null)
                   workspace = (Workspace) wsProvider.getProvider();
              return workspace;
         * Obtain information about a user. Only the 'userName' parameter must be
         * non-null.
         public static UserData getFullUserData(String userName, ExecutionContext cxt,
                   Workspace ws) throws DataException, ServiceException {
              if (ws == null)
                   ws = getSystemWorkspace();
              UserData userData = UserStorage.retrieveUserDatabaseProfileDataFull(userName, ws, null, cxt, true, true);
              return userData;
         public void executeService(DataBinder binder, String userName,
                   boolean suppressServiceError) throws DataException,
                   ServiceException {
              // obtain a connection to the database
              Workspace workspace = getSystemWorkspace();
              // check for an IdcService value
              String cmd = binder.getLocal("IdcService");
                   if (cmd == null)
                   throw new DataException("!csIdcServiceMissing");
              // obtain the service definition
              ServiceData serviceData = ServiceManager.getFullService(cmd);
              System.out.println(cmd+".....serviceData-------------"+serviceData);
              if (serviceData == null)
                   throw new DataException(LocaleUtils.encodeMessage(
                             "!csNoServiceDefined", null, cmd));
              // create the service object for this service
              Service service = ServiceManager.createService(serviceData.m_classID,workspace, null, binder, serviceData);
              // obtain the full user data for this user
              //if(service.getCachedObject("propFile")==null){
              UserData fullUserData = getFullUserData(userName, service, workspace);
              service.setUserData(fullUserData);
              binder.m_environment.put("REMOTE_USER", userName);
              ServiceException error = null;
              try {
                   // init the service to not send HTML back
                   service.setSendFlags(true, true);
                   // create all the ServiceHandlers and implementors
                   service.initDelegatedObjects();
                   // do a security check
                   service.globalSecurityCheck();
                   // prepare for the service
                   service.preActions();
                   // execute the service
                   service.doActions();
                   // do any cleanup
                   service.postActions();
                   // store any new personalization data
                   service.updateSubjectInformation(true);
                   service.updateTopicInformation(binder);
              } catch (ServiceException e) {
                   error = e;
              } finally {
                   // Remove all the temp files.
                   service.cleanUp(true);
                   workspace.releaseConnection();
              // handle any error
              if (error != null) {
                   if (suppressServiceError) {
                        error.printStackTrace();
                        if (binder.getLocal("StatusCode") == null) {
                             binder.putLocal("StatusCode", String
                                       .valueOf(error.m_errorCode));
                             binder.putLocal("StatusMessage", error.getMessage());
                   } else {
                        throw new ServiceException(error.m_errorCode, error
                                  .getMessage());
    Edited by: user4884609 on Nov 5, 2012 5:05 PM

    The error you get tells you that the server cannot find the service GET_SEARCH_RESULTS.
    I checked the documentation (http://download.oracle.com/docs/cd/E17904_01/doc.1111/e11011/c05_core.htm#BABJBFFD) and this service is defined as a subservice - therefore, you might call it only within other service and (most likely) not directly from java.
    I guess that you use a filter because you use some standard hooks (like check-in ones). Therefore, you might not be able to call subservice prior to calling the filter. I'd suggest you to write what you are trying to achieve - it seems to me a bit strange that as a result of a filter you want to nothing else but fill-in a search result set.

  • How to call MSC2N in the QA11 transaction before saving the data

    I need to call MSC2N in the QA11 transaction because i want the Next inspection date for the particular material, plant, and batch. but while iam in QA11 the batch is locked so it will not allow me to go to MSC2N. So to see Next inspection date i have to come out of QA11 and then go to MSC2N to get corresponding Next inspection date.
    <b>To avoid this i want that in QA11 i should call MSC2N. or how to unlock batch so that i can go to MSC2N while iam in QA11.......is it possible</b>
    Pls provide me suggestion.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

    Hi Hemant
    Please use Function Module
    VB_CHANGE_BATCH
    and pass BYPASS_LOCK = 'X' and fill in all the other fields.
    Please reward if found helpful
    Thanks
    Prasad

  • How To Call SQL Server SP's in Oracle 11G

    Hi
    I have sucessfuly established the connectivity between Oracle 11G and SQl Server 2008 and I am able to select the data from views or tables of sql server in oracle.
    but now I have 1 issue I am not able to call or execute the SP's or function of sql server in oracle 11G.
    Can you please suggest or help me.
    Thanks
    Regards
    Anant.

    Anant,
    Which gateway are you using to connect to SQL*Server ? Is it the Database Gateway for SQL*Server (DG4MSQL) or Database Gateway for ODBC (DG4ODBC) ?
    If it is DG4MSQL then have a look at this note in My Oracle Support -
    Different Methods For Calling MS SQL Server Procedures Using DG4MSQL (Doc ID 197192.1)
    If you still have problems using DG4MSQL then post an example of what you are trying to do and the errors you receive.
    If you are using DG4ODBC then this does not support calling remote stored procedures.
    Regards,
    Mike
    Edited by: mkirtley on Aug 8, 2012 3:32 PM

  • HOW to call at anytime the form6 "do you want to save the changes you have made"????

    HOW to call at anytime in form6 "do you want to change the save you have made"????
    It executes only if you use exit_forms
    and I don t want to save with a commit_forms
    without do appears this forms of form6
    Thanks a lots for any answering
    null

    you have to write a trigger on key-clrfrm and key-next-record.
    on that triggers you can call alert with 2 or 3 buttons.
    I hope it will help.
    Mustafa

  • How to call sql loader ctrl file with in the pl/sql procedure

    Hi Friends,
    I am doing a project related with the transferring data using queues. In the queue , I will get a tab delimited data in the form of CLOB variable/message. I do want to store that dat in the oracle table.
    When updating data into the table ,
    1. Don't want to write that data into a file.( Want to access directly after dequeueing from the specfic queue).
    2. As the data is in tab delimited form, I want to use sql loader concept.
    How do I call the sql loader ctrl file with in my pl/sql procedure. When I searched , most of the forums recommending external procedure or Java program.
    Please Guide me on this issue. my preferrence is pl sql, But don't know about external procedure . If no other way , I will try Java.
    I am using oracle 9.2.0.8.0.
    Thanks in advance,
    Vimal..

    Neither SQL*Loader nor external tables are designed to read data from a CLOB stored in the database. They both work on files stored on the file system. If you don't want the data to be written to a file, you're going to have to roll your own parsing code. This is certainly possible. But it is going to be far less efficient than either SQL*Loader or external tables. And it's likely to involve quite a bit more code.
    The simplest possible thing that could work would be to use something like Tom Kyte's string tokenization package to read a line from the CLOB, break it into the component pieces, and then store the different tokens in a meaningful collection (i.e. an object type or a record type that corresponds to the table definition). Of course, you'll need to handle things like converting strings to numbers or dates, rejecting rows, writing log files, etc.
    Justin

Maybe you are looking for

  • I cant download anything frm my bb curve 8520

    Haai ppl,pls help me here everytime when I try to download on my bb 8520 it always fails nd its something new,I don't knw what to do now.

  • Upgraded a computer - Gameport stopped function

    Hi all. This is interesting. I recently bought a brand new computer, and installed XP. I wanted my old joystick to work here, so I intalled my old sound card, which worked fine in the old computer (as did the joystick). Now, the sound works fine, but

  • Someone deleted my datafile...

    On windows oracle 10.2 I just created the database. It is for development purposes. Ther eis nothing in it I can't afford to lose. I don't have a backup. I just want to drop the tablespace with the datafile in it. 1. I can mount the database, but can

  • Charged for something I never received.

    I purchased credit for an app and although I was charged I never received my credit. Who do I contact for a refund? I've spoken to the people from the App and they said I must contact Apple directly. How do I contact apple? I cant seem to find any co

  • Save query results in pipe delimited format

    I am running a query in SQL Developer. Can you please tell me how to save and/or export the results in pipe delimited format? Thanks....