Query with parameters syntax

Hi,
Could somebody please help with the C# syntax for Oracle Lite. I can execute select statement without parameters, but parameterized query doesn’t work. What is wrong in my code?
LiteConnection liteConn=new LiteConnection("10270_pwcoffline");
LiteCommand lcmd=new LiteCommand() ;
lcmd.Connection=liteConn;
lcmd.CommandText="Select * from ol_off_dept where office = :off";
lcmd.CommandType=CommandType.Text ;
int off = 10;
LiteParameter p1 = new LiteParameter("off", DbType.VarNumeric, "office");
p1.Value = off;
lcmd.Parameters.Add(p1);
LiteDataAdapter lad=new LiteDataAdapter(lcmd);
DataSet ds=new DataSet();
lad.Fill(ds,"TDM");
this.dataGrid1.DataSource = ds;
The error is:
System.Data.DataException: 37000[POL-5228] syntax error at Oracle.Lite.Data.LiteCommand.Prepare()…
Thanks

Jenny,
Please let us know if you still need this post resolved.
Thank you.

Similar Messages

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Use plan from stored_outlines from query with different syntax?

    Hello,
    I'd like to know is there any ability to use via stored_outlines plan from query with different syntax?
    Database version - 11.1.06
    If yes, maybe you'll take a look at steps (based on Metalink 726802.1), what I tried to do to make it work (with no success):
    alter session set create_stored_outlines=good;
    run good query
    create private outline good from SYS_OUTLINE_0... -< GOOD
    alter session set create_stored_outlines=bad;
    run bad query
    create private outline good from SYS_OUTLINE_0... -< BAD
    update ol$ set sql_text, textlen, signature, hash_value, hash_value2 from BAD to GOOD records
    leave ol$hintcount for GOOD untouched
    delete ol$ where ol_name='BAD';
    delete ol$hints where ol_name='BAD';
    delete ol$nodes where ol_name='BAD';
    execute dbms_outln_edit.refresh_private_outline('GOOD');
    alter session set sql_trace=true;
    alter session set use_private_outlines=true;
    run bad query
    examine trace file and find that it use execution plan different from both bad and good queries
    PS: Originally bad query is posted already Re: Poor performance while join of 2 comprehensive large views and small table
    PPS: Also I review thread CBO not picking correct indexes or doing Full Scans
    Thanks,
    Sergiy
    Edited by: kiberpress on Sep 30, 2009 6:59 AM

    A query with different syntax would result in a different hash value.
    Stored outlines work based on hash value.
    Your question is probably answered now.
    Sybrand Bakker
    Senior Oracle DBA

  • 11G Pivot Query with parameters

    Hello all,
    I would like to find some way, any way to pass parameters to a pivot query. The following pivot query works, but I would like segment2 to be a variable as well as the period names so....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >='007611' and segment2 <='007751' AND period_name in ('SEP-08','OCT-08','NOV-08'))
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08') )
    ....would be something like....
    select * from
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 >= :P4_OBJECT_FROM AND and segment2 <=:P4_OBJECT_TO AND period_name in &P4_EPSB_PERIOD_HOLD.)
    pivot
    sum(accounted_dr)
    for period_name in (&P4_EPSB_PERIOD_HOLD.) )
    It is our understanding that we have to hardcode period names and objects, but we would like to get around that. Does anyone have any ideas or tricks?
    Thanks

    lilhelp wrote:
    Hello all,
    We are trying to use the 11G pivot query function with data from Oracle E-Business Suite. We have an 11G database installed with our Oracle APEX. We cannot seem to get the pivot function to work. At a glance, would anyone be able to see any glaring errors in our syntax. I am not certain it is possible to provide test data Why not?
    >
    We are trying to have column headings with the Period Names SEP-08 OCT-08 NOV-08, with rows of segment2 007751 and accounted_dr as the dataset.
    When we run the sql we get an error ORA-00904: "PERIOD_NAME": invalid identifier.
    Any help or insight would be greatly appreciated.
    select * from (
    select segment2, accounted_dr, period_name
    from gl_je_lines a, gl_code_combinations b
    where b.code_combination_id = a.code_combination_id
    and segment2 = '007751')
    pivot
    sum(accounted_dr)
    for period_name in ('SEP-08','OCT-08','NOV-08')
    group by segment2, period_nameDon't use GROUP BY. When you use PIVOT, the grouping is implied by what is in the PIVOT clause and what is not.
    Try this:
    select    *
    from        (
           select  segment2
           ,       accounted_dr
           ,       period_name
           from       gl_je_lines          a
           ,       gl_code_combinations     b
           where       b.code_combination_id = a.code_combination_id
           and       segment2 = '007751'
    pivot       (
           sum (accounted_dr)
           for period_name in ('SEP-08','OCT-08','NOV-08')
    ;which is just your posted query without the GROUP BY clause.

  • Is it possible to provide an BEx Web Query with parameters based on iView?

    Hi SAP Portal experts,
    My knowledge of SAP Portal is limited and I ran into the following problem:
    I have got about 60 BEx Web Queries which should be put into some sort of navigation. Furthermore I would like to intodruce one start page where the user can preselect common bex query variables (e.g. company code) by clicking on a map.
    My approach was to put all query links into a BEx Web Application Template. The template includes a JavaScript storing the userdefined values in a cookie. As soon as the user clicks on a link the cookie values are read from that cookie and a query parameter string is set up like "&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=2100&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=0P_COCD" and concatenated with the URL for the BEx Query.
    My colleague wants me to put all this into SAP Portal and to create an iView for each BEx Query. How can I achieve that? I have already had a look at the iView property "parameters passed on to BEx Web Application". If I put my parameter string there, it works fine. However, I would like to replace VARIABLE_INPUT_STRING=2100 and VARIABLE=0P_COCD with the values selected by the user by clicking on the map. So how can I set up a parameter or variable in one iView and read it in another iView with a BEx Web Query???
    Thank you very much in advance
    Martin

    I have thought about this. There are some problems here....
    I cannot use the same proxy to invoke the java callout and then based on the code or handler disable it, since
    1) i would have no way to enable back the proxy again.
    2) Also there is some amount of message loss.
    So i will have to use another proxy to do the same, but in this case
    1) what would be the trigger to this proxy?
    2) And how often do i invoke the java callout to see if the URI is up or not? (wouldnt that affect the performance?)
    I am just wondering why did they give an offline URI option in the business service and no similar option in the proxy service, Any Idea?
    Thanks

  • Reports 9ids query with parameters

    I've created a basic report that pulls from one table. However, I need to have it read two different global variables from the form from which it is run from. I have not been able to make that happen. currently I'm running the report by utilizing WEB.show.document. I need it to pull in the report where two of the fields are equal to the two global variables. How do I do this?? Any help would be great. Part of the URL i've created a keycommand in the cgicmd.dat file.
    Thank you

    If I understand correctly, you want to base the output of your report on some global data in the form from which you're invoking the report. In that case, you can create user parameters in your report, and base your query on those user parameters (say, P_1 and P_2). Pass the values of these parameters in the report invocation URL.
    That's only as far as I understood your question. Also refer to the Building Reports Manual and the Publishing Reports Manual for more insights.
    -Manish

  • Jpa query with parameters in Greek

    Hello
    I use netbeans 6.9.1 and toplinlk essensials for jpa connected to a mysql database
    mysql database constants:
    character_set_database = utf8
    character_set_server = utf8
    character_set_system = utf8
    I have this code
    Query qItemom = emOpsw.createQuery("SELECT m FROM Itemom m WHERE "
    + " m.book = :book AND m.omfile = :omfile AND m.omaster = :omaster ");
    qItemom.setParameter("book", (short)1);
    qItemom.setParameter("omfile", (byte)2);
    qItemom.setParameter("omaster", "ΕΚΡ");
    The "omaster" parameter is a String. When i pass latin characters i get results, but when i pass
    a greek character string "ΕΚΡ" for example, i do not get any results at all.
    Can anyone help me?
    Than you in advance.

    Could be a MySQL or JDBC issue. Try the same query using raw JDBC and the bind parameter.
    You could also try disabling parameter binding, if the issue has to do with your JDBC driver's binding.
    James : htttp://www.eclipselink.org

  • Query with parameters

    SELECT
    A.DocEntry, A.DocNum, A.Series, A.PostDate, A.DueDate,
    A.ItemCode AS Parent,A.PlannedQty, A.CmpltQty, A.RjctQty,
    B.ItemCode AS CHLD, B.BaseQTY, B.PlannedQTY,B.IssuedQTY,
    A.CmpltQtyB.BaseQTY AS Compl_QTY, A.RjctQtyB.BaseQTY AS Rej_QTY,
    C.LastPurPrc as PurPrise, C.LstEvlPric as EvlPrice,
    D.LineTotal,
    B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)) As WIP_QTY,
    (B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)))* C.LstEvlPric As WIP_Valuation,
    A.Comments
    FROM
    OWOR A INNER JOIN WOR1 B ON A.DocEntry = B.DocEntry
           INNER JOIN OITM C ON B.ItemCode = C.ItemCode
           JOIN IGE1 D ON B.DocEntry=D.BaseRef AND D.BaseLine =B.LineNum
    WHERE A.Status='R'
    AND  A.PostDate BETWEEN
    (CASE WHEN '\[%0]' = ' ' THEN '1/1/2007' else '\[%0]' END)
    and
    (CASE WHEN '\[%1]' = '' THEN '1/12/2050' else '\[%1]' END)
    The above query does not accept parameter for the table OWOR A.It gives error for the parameter A.PostDate as,
    Query sentence was not completed.
    Parameters are being accepted for the other tables.
    Edited by: Dilip Kumbhar on Feb 12, 2008 12:07 PM

    If you run the query direct in sql management studio or query analyzer, gives it the same error?
    I think, that the problem is somewhere in SBO, because i found out, that sap is modifiing the queries inside.
    Try to rename one plannedqty in select statement as plan1 - maybe two same names in select are doing this problems. Or to prevent the sap modifiing, try it as select from select as
    select
    DocEntry, DocNum, Series, PostDate, DueDate,
    Parent,Plan1, CmpltQty, RjctQty,
    CHLD, BaseQTY, PlannedQTY,IssuedQTY,
    Compl_QTY,  Rej_QTY,
    PurPrise,  EvlPrice,
    LineTotal,
    WIP_QTY,
    WIP_Valuation,
    Comments
    from
    SELECT
    A.DocEntry, A.DocNum, A.Series, A.PostDate, A.DueDate,
    A.ItemCode AS Parent,A.PlannedQty as Plan1, A.CmpltQty, A.RjctQty,
    B.ItemCode AS CHLD, B.BaseQTY, B.PlannedQTY,B.IssuedQTY,
    A.CmpltQtyB.BaseQTY AS Compl_QTY, A.RjctQtyB.BaseQTY AS Rej_QTY,
    C.LastPurPrc as PurPrise, C.LstEvlPric as EvlPrice,
    D.LineTotal,
    B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)) As WIP_QTY,
    (B.IssuedQTY -((A.CmpltQtyB.BaseQTY) + (A.RjctQtyB.BaseQTY)))* C.LstEvlPric As WIP_Valuation,
    A.Comments
    FROM
    OWOR A INNER JOIN WOR1 B ON A.DocEntry = B.DocEntry
    INNER JOIN OITM C ON B.ItemCode = C.ItemCode
    JOIN IGE1 D ON B.DocEntry=D.BaseRef AND D.BaseLine =B.LineNum
    WHERE A.Status='R'
    ) T
    hope it helps you

  • SQL query with "parameters"

    Hi,
    I want a sql query as follows (but it seems not be as simple as that...)
    select A1, A2,
    select sum(B3)
    from B1 = A2
    where
    from A
    where A1 = '1001'
    is it possible, in some way, to have A2 from outer select statement as a parameter to inner select statement?

    Hi,
    user8819407 wrote:
    Hi,
    I want a sql query as follows (but it seems not be as simple as that...)
    select A1, A2,
    select sum(B3)
    from B1 = A2
    where
    from A
    where A1 = '1001'
    is it possible, in some way, to have A2 from outer select statement as a parameter to inner select statement?Yes, you can reference columns from a parent query within its child query.
    For example:
    select  A1, A2,
             select  sum (b.B3)
             from   b
             where  b.B1 = a.A2
    from     A
    where     A1 = '1001'
    ;Within the sub-query, you don't have to qualify columns from b; that is, b3 is assumed to mean b.b3. If the column name is unique, you don't have to qualify columns from table a, either. That is, if b does not have a column called a2, then a2 in the sub-query could only mean a.a2, and Oracle doesn't make you spell out which table a2 comes from, but it makes the code a lot easier to understand and debug if you do qualify the columns.
    By the way, a sub-query that references its parent query like this is called a Correlated Sub-Query .
    "Parameter" doesn't really apply to this situation.

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Synchronizing database query with update notifications via AQ

    I am building a financial system and want to keep all my reference data in the database.
    If one user updates a piece of data, I need all users that use that data to be notified of the change.
    I know I can do this using triggers and publish-subscribe, but I have a synchronization problem:
    A client comes up, queries initial value via select, then (or before) subscribe to updates.
    Since the AQ channel is seperate from the regulal DB connection, I do not know if I missed an update notification that happened just after I queried, but before my subscription came into effect, or I might even get an update that is older then my query.
    I know I can add sequance numbers to all updates, and force an initial update each time a new client connects, but that is both slow and complex.
    Can anybody think of a simple way to have a database query synchronized with updates?

    A query with different syntax would result in a different hash value.
    Stored outlines work based on hash value.
    Your question is probably answered now.
    Sybrand Bakker
    Senior Oracle DBA

  • Running a SQL Stored Procedure from Power Query with Dynamic Parameters

    Hi,
    I want to execute a stored procedure from Power Query with dynamic parameters.
    In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
        Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
    Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
        Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        Name_Value = Name_Parameter{0}[Value],
    I have tried like below but it is not working.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
    Can anyone please help me with this issue.
    Thanks
    Dileep

    Hi,
    I got it. Below is the correct syntax.
    Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
    Thanks
    Dileep

  • How to write XSJS Select Query with input parameters

    Hello Experts,
    I am creating a xsjs file and in that file I am trying to write a Select Query based on a Calculation View
    I have tried it the following way:
    var query = 'SELECT TOP 100 \"Name\", \"Address\", \"City\", \"Country\" FROM \"_SYS_BIC\".\"Test.HL/AddressView\"'
        + 'WITH PARAMETERS(\'PLACEHOLDER\' = (\'$$P_Name$$\', \' Akhil \'),'
      + '\'PLACEHOLDER\' = (\'$$P_City$$\', \' Lucknow \'))';
    But it gives me the "Mixed spaces and tabs error".
    How should I write XSJS Select Query with input parameters?
    Regards,
    Rohit

    >But it gives me the "Mixed spaces and tabs error".
    Mixed spaces and tabs has nothing to do with the syntax of the statement. You used both spaces and the tab in the content - which JSLint doesn't like.  Remove the beginning spaces of each line and use only one or the other.
    The actual syntax of your statement doesn't look right.  The problem is that you are escaping the \ when you don't need to if you are using ' instead of " for your string.  You escape with \" in the first line but then escape with \' in the 2nd and 3rd line.  That is going to cause serious parsing problems with the command.

  • How do I create a folder or report from a query with a union and parameters

    I have created folders with unions but I am having difficulty coverting a query with a union and parameters.
    The following works great in SQL*Developer without parameters, but I want to change to use parameters for the year and quarter and use it in Discoverer:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
      AV.FIRM_NAME VENDOR_NAME,
      AV.BIDCLASS CONTRACT_CODES,
      AV.AWAMT AWARD_AMOUNT,
      AV.SOL_MODE FORMAL_INFORMAL,
      AV.CERT BUSINESS_ENTITY,
      AV.ETHNICITY ETHNICTY,
      AV.PO_NUMBER_FORMAT CONTRACT,
      SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
      CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID       = VP.VENDOR_ID ) )
    AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')
    AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
      AV.FIRM_NAME,
      AV.BIDCLASS,
      AV.AWAMT,
      AV.SOL_MODE,
      AV.CERT,
      AV.ETHNICITY,
      AV.PO_NUMBER_FORMAT
      union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
      AV2.FIRM_NAME VENDOR_NAME,
      AV2.BIDCLASS CONTRACT_CODES,
      AV2.AWAMT AWARD_AMOUNT,
      AV2.SOL_MODE FORMAL_INFORMAL,
      AV2.CERT BUSINESS_ENTITY,
      AV2.ETHNICITY ETHNICTY,
      AV2.PO_NUMBER_FORMAT CONTRACT,
      0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
                  FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
                 WHERE av2.po_number = vp2.po_number
                       AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = '4')
                       AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = '2009' ))
    AND (TO_CHAR(AV2.AWDATE,'Q') = '4')
    AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
      AV2.FIRM_NAME,
      AV2.BIDCLASS,
      AV2.AWAMT,
      AV2.SOL_MODE,
      AV2.CERT,
      AV2.ETHNICITY,
      AV2.PO_NUMBER_FORMAT Can someone provide a solution?
    Thank you,
    Robert

    Hi,
    You can take the parameters to the select so that you will be able to create conditions over them.
    Try to use this SQL instead of your and in the discoverer workbook create the conditions and parameters:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
    AV.FIRM_NAME VENDOR_NAME,
    AV.BIDCLASS CONTRACT_CODES,
    AV.AWAMT AWARD_AMOUNT,
    AV.SOL_MODE FORMAL_INFORMAL,
    AV.CERT BUSINESS_ENTITY,
    AV.ETHNICITY ETHNICTY,
    AV.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
    CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID = VP.VENDOR_ID ) )
    --AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')*
    --AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )*
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
    AV.FIRM_NAME,
    AV.BIDCLASS,
    AV.AWAMT,
    AV.SOL_MODE,
    AV.CERT,
    AV.ETHNICITY,
    AV.PO_NUMBER_FORMAT ,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
    AV2.FIRM_NAME VENDOR_NAME,
    AV2.BIDCLASS CONTRACT_CODES,
    AV2.AWAMT AWARD_AMOUNT,
    AV2.SOL_MODE FORMAL_INFORMAL,
    AV2.CERT BUSINESS_ENTITY,
    AV2.ETHNICITY ETHNICTY,
    AV2.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
    FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
    WHERE av2.po_number = vp2.po_number
    AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = TO_CHAR(VP.PAYMENT_DATE,'Q') )
    AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = TO_CHAR(VP.PAYMENT_DATE,'YYYY') ))
    --AND (TO_CHAR(AV2.AWDATE,'Q') = '4')*
    --AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')*
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
    AV2.FIRM_NAME,
    AV2.BIDCLASS,
    AV2.AWAMT,
    AV2.SOL_MODE,
    AV2.CERT,
    AV2.ETHNICITY,
    AV2.PO_NUMBER_FORMAT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    Tamir

Maybe you are looking for

  • OLAP Cube / DataWarehouse corruption (?) - TfsJobAgent no longer syncronizing

    About a week ago, this stopped working. I notice 3 errors in the event log: EventId 3300, 3300,3305: The error involves the TfsJobAgent, an apparent failure to update a dimension attribute & process the analysis cube. Since then I've tried to A) proc

  • Field codes in Word document

    Hi, This issue keeps occuring when I generate a printed document from RoboHelp. I am not choosing the Word template in the final setting page, but just letting robohelp use the css template. Does anyone have any ideas what is causing this & how to re

  • Video Upscaling Question

    Before I decide to purchase the new aTV2 (I have an aTV1) I have a question about its use with a Marantz receiver that upscales all video sources to 1080p. Are there any known issues or problems using the aTV2 with its 720p output with this type of A

  • Trying to use with TOR - 'Proxy Server is refusing connections' but TOR is connected.

    Added TOR button to Firefox. It could be a TOR problem, but the TOR control panel shows it as connected. When I make TOR enabled and try to go to a website, I get the 'Proxy Server is refusing connections' message.

  • Http server run as services on win2k?

    Hi, I have installed oracle 9i to my win2k and would like to setup the http server to run as services, but can't found any document about it. This is command line how I start OC4J from report 9i (startinst.bat): C:\work\programs\oracle\developer\jdk\