Report based on mutually exclusive items:

Hi guys,
I am trying to create a parameterized report based on mutually exclusive items:
I have a Select List item "P1_Property_type" which has these values ( office , apartment ),
if 'office' is chosen then the report should consider ONLY the value of the select list item "P1_beds"
if 'apartment' is chosen then the report should consider ONLY the value of the select list "P1_size"
I used this query, but it does not seem to wrok:
select * from realestate where
unit_type = decode (:P1_PROPERTY_TYPE,'null',unit_type,:P1_property_type)
and
( br= decode (:P1_beds,'null',br,:P1_beds) or size= decode (:P1_size,'null',size,:P1_size) )----------------
I hope my question is clear
Regards,
Fateh

Assuming you're using the string literal 'null' rather than NULL.
"it does not seem to work" because of this:
( br= decode (:P1_beds,'null',br,:P1_beds) or size= decode (:P1_size,'null',size,:P1_size) )Assuming you pick "office" and :p1_beds is set and :p1_size is 'null', you end up with a statement that is the equivalent of:
select * from realesate
where unit_type = 'office'
and (br = :p1_beds
or size=size)    <--------------problemand your :p1_beds restriction is then ineffective.
I'm not a fan of decode to do this logic.
I prefer a clear statement of exclusive predicates which the optimizer can sometimes deal with more effectively.
e.g. assuming that it's irrelevant whether you pick office or appartment because the relevant parameter :p1_beds or :p1_size will be set appropriately:
select * from realestate
where
      (:p1.property_type is null / = 'null'
or    (:p1.property_type is not null / != 'null'
and    unit_type          = :p1_property_type))
and   (:p1_beds          is null / = 'null'
or    (:p1_beds          is not null / != 'null'
and    br                 = :p1_beds))
and   (:p1_size          is null / = 'null'
or    (:p1_size          is not null / != 'null'
and    size               = :p1_size))Note that I've provided alternatives depending on whether you're actually using NULL or a magic string.

Similar Messages

  • Parameterized report based on mutually exclusive items

    Hi guys,
    if you visit :
    http://apex.oracle.com/pls/apex/f?p=59187:1
    you see that the Select List Item " Property_type" has few values based on which the rest of the items get rendered.
    How Can I write a query to get the correct result based on the chosen values ????
    In other words,
    If the Value of the Item "P1_property_type" is 'Apartment' Then the Item "P1_beds" gets rendered and sould be considered in the query.
    ( the un-rendered items should be ignored in the query )
    If the Value of the Item "P1_property_type" is 'Villa' Then the Item "P1_beds" does get rendered and sould not be considered in the query.
    If the Value of the Item "P1_property_type" is 'Office' Then the Item "P1_beds" does not get rendered and sould not be considered in the query. But the Items "P1_Max_Sqft" and "P1_Min_Sqft" get rendered and should be considered in the query.
    If the the Select Value items contain the default values then that should be similar to ( select * from srm ) except for if "P1_property_type" has its default value then the page should not be submitted.... ( there should be an alert )
    Work Space: somefeto
    User name: [email protected]
    Password: Firas
    App: 59187 ( the executive towers )
    I hope my question is clear...& thanks for the help...
    Regards,
    Fateh

    Fateh,
    The short answer is yes this is possible but there are many ways to achieve this and I will offer you two of them.
    1. Test for null or value
    basically all you do is for every item rather than checking its value against the column you check to see if it is null or if it matches the value of a column this way this input has no effect on the query if it is null. This approach is fine for smaller datasets but maybe not the best for larger datasets. (of course this is always case by case)
    select *
      from table
    where (:item1 is null or
            column1 = :item1)
       and (:item2 is null or
            column2 = :item2)
       and (:item3 is null or
            column3 = :item3)2. function returning query
    If your inputs have a value then add them to the predicate of your query. This can be encapsulated into a database package/function. we add the 1=1 as the first part of the predicate so it is easier to manage the "and"ing.
    declare
      v_sql varchar2(32000);
    begin
      v_sql := 'select * from table where 1=1 ';
      if :item1 is not null then
        v_sql := v_sql || 'and column1 = :item1 ';
      end if;
      if :item2 is not null then
        v_sql := v_sql || 'and column2 = :item2 ';
      end if;
      if :item3 is not null then
        v_sql := v_sql || 'and column3 = :item3 ';
      end if;
      return(v_sql);
    end;These are not the only options out there but this should cover many situations. If you want to get really crazy you can create a sql type and return that from a pipelined function and cast that as a table. I would generally stick to one of these two options though :P.
    Cheers,
    Tyson Jouglet

  • IR Report based off of page item value

    Hey all,
    I want to create an IRR region and have the report update based off of a a page item.
    The page item will be a drop down of the tables I want to show, so something like:
    Select * from '||v('P1_TABLES')
    This will work with the normal report but not with the IRR. Is the syntax incorrect?
    Help is appreciated!
    Edited by: Ben C on Feb 23, 2012 6:42 AM

    Zooid,
    but always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always always
    use bind variables !!!!
    Regards,
    Richard
    blog: http://blog.warp11.nl
    twitter: @rhjmartens
    If this question is answered, please mark the thread as closed and assign points where earned..

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • R12: How to filter Open Item Revaluation Report based on GL Date

    Hi,
    Anybody know how to filter Open Item Revaluation Report based on GL Date from and GL Date to in R12?
    Since we just upgraded from 11.5.10 to 12.1.3 and found we cannot filter those report for specific date. It shown all data included the old data from 8 years ago also.
    We need to run the report only for specific date only. Please share with me if anyone know about this.
    Thanks.

    Pl do not post duplicates - R12: How to filter Open Item Revaluation Report based on GL Date

  • Report for Shipment cost calculation based on Delviery Line items

    Hi,
    What would be the Standard SAP report where I can find the shipment cost based on Delivery line item. Currently there is a report ME2S that gives the cost based on PO. But I want to find a report based on outbound delivery line item.
    Regards
    Gaurav

    I hope VI11 should help you

  • Report based on a ITEM (which has SQL statement)

    Hi everyone,
    I have a created a form based on a table which has 1 column that stores SQL statement in the database.And i am displaying the SQL statement in TEXT AREA FILED.
    What i want to do is to create a report based on that SQL statement (Which is in the TEXT AREA field on the same page).I tried to create a report region with
    :P25_SQL_STATEMENT.But i am getting an error
    ----->invalid query, no select statement found.
    How can i do a report based on the item which has SQL query in it.
    Thanks
    phani
    .

    Hi Jkallman,
    Thanks for the reply.I have a (FORM WITH REPORT) on a table which has column of SQL_STMNT VARCHAR2(2000 BYTE) which takes the SQL statement entered from the FORM.
    1.I have a report which shows all the records in the above mention table on page 10
    2.If i hit the edit button in the report i go to page 11 which i have the FORM on the above mentioned table.In that form i have a field :P11_SQL_STMNT.
    3.I am trying to create a report on the same page 11 based on the SQL query of that :P11_SQL_STMNT.
    4.I did the follwoing steps
    --> create a region
    ----> report
    ---->sql report
    and entered the following code.
    begin
    return (:P11_SQL_STMNT);
    end;
    but it is giving me the error which i mentioned in the previous post.If u need any more details i can provide
    Thanks in advance
    phani

  • Mutually exclusive set of items

    Hi,
    I have 5 check boxes. check box 5 - should not be available if any of the 4 check boxes are checked. and also if check box 5 is checked, none of the other 4 check boxes should be enabled. Could any one give me a suggestion about how to achieve this? Thanks,
    Lakshmi

    Hi Lakshmi,
    If I'm interpreting your question correctly, you don't have a simple case of 5 mutually exclusive choices (1 or 2 or 3 or 4 or 5) - if you do then use a Radio Group.
    I'm thinking, however, that your user can choose multiples from 1-4 but, if they do then 5 is not available e.g. they can choose (1 and 3 and 4 but not 5) or they can choose (5 only).
    One approach would be to define a Validation and check at submit time. Another approach would be to code some Javascript to enable/disable the checkboxes.
    My preference would be for the Validation (and not just because I don't know Javascript).
    Looking at it from a useability perspective, I'd prefer to give the user an explanation on the screen - say a label that indicates which combinations are valid or put checkboxes 1, 2, 3, and 4 in a different region and indicate that the regions are 'mutually exclusive' - and then 'trap' any error they make. Essentially, I'm advocating enabling the user to give the correct response rather than controlling their every mouse click. If it's not obvious what an appropriate choice is, they'll get very confused if a checkbox suddenly become unavailable because they've clicked somewhere else.
    I'd be keen to see what the Javascript coders can come up with, though.
    Cheers,
    Bryan.

  • Handle mutually exclusive user parameters

    Handle mutually exclusive user parameters
    Hi Everyone,
    I have a report, needs to handle mutually exclusive user parameters, e.g. District, Region, Location. I need to handle the User Parameter Form in the following scenario, if users put/select a value in District, then other 2 parameters(Region, Location) would show null. The same logic works on the other 2 parameter. Anyway, the report user parameter form shows 3 parameters, however, any choice in one parameter would nullify the other 2. This is not a web report, only paper based, with a default User Parameter Form
    I would be very appreciating if any one can help.
    Regards!
    AChen

    Hi,
    I don't think it is possible to get a dynamic parameter form like that. At most, you can use some Javascript on the parameter form field, eg, if the value is not a number, you show an error msg and so on. But it may not be possible to dynamically change the field values baed on a user action.
    You can do it in a JSP though, that submits request to your paper report.
    Navneet.

  • Open orders display in BEX report based on Key date

    Hello All,
    I have a requirement:
    We have an existing report which needs to have input selection as Key Date.
    The report should display the Open orders based on the key date mentioned.
    For Eg: if an item A was Opened on 20th Sept, 2010 and now CLEARED and if I run the ECC report today and mention the key date as 20th Sept, 2010, then the report will show me the item A status as OPEN
    Plz help me with the logic for the same at the earliest
    Tthanks..
    Sneha

    Hi Sneha,
    I assume you have open and crear dates in your query. So put an open date in your query filter and restrict it as less then Key date variable(which is a variable of type user-input on 0calday), then create another variable that feeds from keydate variable (it can be a replacement path or simplest user-exit).
    Note: the another variable is needed because as far as i can remember you cant use the same variable to restrict two different chars in the same query/anyway test if it's not possible - then create another variable as i mentioned.
    Take Cleardate in your query filter and restrict it as more than keydate variable andr # (not assigned). (in case if it hasnt been creared at all yet at the key date time)
    Pls let me know if this was helpfull

  • Sales Analysis Report based on Supplier-wise

    Hi Experts,
    My client requirement is ,We are into trading so , we want a Sales analysis report based on Supplier-wise. like,
    Selection critieria is
    1)Supllier name
    2)From and To date.
    Heading are
    Item name     Sales UoM    Jan(quantity)   Feb(quanitity)   mar(quantity)   April(quanitiy).........
    here, i need only the sum of the quantity for the items for that particular month based on the date giving in selection criteria.
    Regards,
    Dwarak
    Edited by: Dwarak@SMS on Aug 23, 2010 4:29 PM

    Hi experts,
    For my clients requirement,
    I could able to alter my previous query(find below).
    My object is
    1)To get sales report based on Manufacturer.
    2)To get the TOTAL SALES QUANTITY OF THE MONTHS in the report. I go that in the below query, and only thing is that is have to minus the total Credit note for items to get the ACTUAL TOTAL SALES OF THE MONTHS. so , can anyone help me to alter the query to get me the ACTUAL TOTAL SALES OF THE MONTHS.
    the query is
    SELECT T0.ITEMCODE,T0.ItemName,T0.OnHand,
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0) AS 'JAN ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'FEB ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'MAR ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'APR ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'MAY ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 6 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'JUN ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'JUL ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'AUG ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'SEP ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'OCT ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'NOV ',
    (SELECT SUM(T1.QUANTITY) FROM INV1 T1 with
    (NOLOCK) WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE = T0.ITEMCODE AND YEAR(T1.DOCDATE) = YEAR(GETDATE())-0)  AS 'DEC '
    FROM dbo.OITM T0
    LEFT JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode WHERE T0.SellItem = 'Y' and T0.[FirmCode] =[%0]
    GROUP BY T0.ItemCode,T0.Itemname,T0.OnHand,YEAR(T1.DOCDATE) HAVING YEAR(T1.DOCDATE) =
    YEAR(GETDATE())-0
    ORDER BY T0. ITEMCODE

  • Payments based on inventory type, item category...

    Hi,
    I am trying to develop a report to show unrecorded liabilities - basically, I need to find out if there are payments/accounting documents/invoice number existing in the system, that has no connecting documents in purchase or sales side. I am able to do this using REGUP/BSEG/VBAP/EKPO (and corresponding header) tables.
    I am stuck at one requirement though.
    "Segregate payments in to inventory, non-inventory, no-link categories based on product/service (item type/item category) or/and vendor type (inventory/non-inventory)."
    Can someone please tell me how to divide payments as mentioned above? Is it based on material type?
    Thanks in advance!

    If FI postings for inventory and non-inventory are posted to different G/L accounts then you should be able to filter that using HKONT field in BSEG. On the purchasing side, if G/L account number won't suffice then check if you can use cost element field KOSTL. On the sales side you should be able to filter this using PRCTR.
    If this approach cannot be used then you have to drill down to VBEP table and check if there is a movement type attached to this order item (for third party items, check for VBEP-LFREL = X). This will be accurate depending on how sales configuration was set up.
    On the purchasing side, use a combination Item category and Account assignment category in table EKPO to identify and segregate the totals.
    Raj
    PS: The first approach is the best approach and I hope that is how they have configured it in your system

  • How to create a report based on the selection of a node of a tree

    Hello,
    I am new to Oracle Apex and I was trying to build a tree and also an interactive report based on the empno column of the emp table.
    I have created a tree based on emp table. Now I want to display records of the employee selected in the tree.
    Here is the tree query:
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    null as link
    from "#OWNER#"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME"
    Can anyone tell me step by step how to go from here?
    I tried to follow the thread Re: tree question but could not understand much from it.

    The approach for reloading the page and displaying the report is quite simple.
    <li>You start by creating a new page item which would be used to store the selected node ID , eg. P100_SELECTED_NODE (you can make it atext item and change it hidden once everything works as expected)
    <li>Modify the tree query and change the link column in the tree definition SQL query to a link to the same
    for example if your page is 100 , you would make the tree node link to the same page but set the P100SELECTED_NODE with selected node's id_
    This done here
    {message:id=4410987}
    In this case it would be
    'f?p=&APP_ID.:100:'||:APP_SESSION||'::::P100_SELECTED_NODE:'||EMPNO as link Now when you click on a tree node link , it would come back to the same page, but set the P100_SELECTED_NODE with the empno of the clicked node.
    <li> All that is left to do, is changing your Report so that it refers to the new item inorder to filter the records for this employee i.e empno
    SELECT ...
    WHERE empno= :P100_SELECTED_NODE

  • How to create a report based on radia selection

    Hi,
    I am new bie to Appex, I have a requiment to generate a report based on existing table with the select creditaria. I mean, the select creditaria wil be the radio button, if i click any option the report will change accordingly.
    It is nothing but filter condition but i need to do with the radio button/items. Please give the detail steps
    Thanks in advance.
    Kumar.

    Kumar,
    First you will need to create the radio group on the page with the report and determine the list of values you would like to filter the report on (dynamic or static). ie:
    select CUST_STATE as display_value, CUST_STATE as return_value
      from DEMO_CUSTOMERS
    order by 1Then you will need to update the report's where clause (demo application page 2 example):
    select customer_id, cust_last_name || ', ' || cust_first_name customer_name, CUST_STREET_ADDRESS1 || decode(CUST_STREET_ADDRESS2, null, null, ', ' || CUST_STREET_ADDRESS2) customer_address, cust_city, cust_state, cust_postal_code
    from demo_customers
    where cust_state = :P2_RADIOWith an Interactive Report, make sure you list the radio group item (P2_RADIO) in the "Page Items to Submit" fields in the report region.
    The you can create an on change dynamic action based on the radio group to refresh the Report region. I made a quick example on apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=34760:2
    Depending on the number of items in the radio group, you may want to think about using a select list also.
    V/R
    Ricker

  • Report based on particular workflow

    Hi all.
    We made a custom workflow for t code fv60. It has got various levels of approvals and conditions. Now the requirement is to develop a report based on this workflow - similar to swi1. but our purpose of the report is to show various parked and published FI documents and the various users in whose inboxes these document mails are kept in varios approvaql stages. E. G. If today a document is parked by user abc and is approved at first level by user def and now that document is in user ghi's inbox  as a workitem , waiting his approval, the report should show all the users and the statuses of document at each stage.
    Is it possible?.
    if so please give some sample code or example on how to build the report.
    Thanks
    Ribhu

    Hi,
    Yes, it is possible but it will be specific to your workflow only and as Kjetil says making a very general report like this for any workflow will be tough !!
    However i can suggest the following so that you can start continuing on this
    1. First find out the Workflow Template number used and also list all the major user decision steps Task Numbers ( say approval1 - Task1, approval2 - Task2, approval3 - Task 3) used. Lets call it as {Task List}
    2. Given the from date and to date and type of document ( KR/KG etc..) get all the FI Documents parked/created on these dates.
    3. For each FI Invoice No call SAP_WAPI_WORKITEMS_TO_OBJECT  with proper object type ( should be either FIPP or BKPF) , object key ( company code + doc no + fiscal year), fill in the Task Filter with your Task List}
       a. The Table parameter WORKLIST will contain information about the workitems related to your user decision items, loop through them and if completed find the actual agent else find the list of recipients using SAP_WAPI_WORKITEM_RECIPIENTS, you can show this as inprocess.
    4. Infact once you get the WORKLIST you can do whatever you want.
    If you have more than one possible workflows associated with same Invoice , then you have to filter your WORKLIST again based on correct workflow template number using WI_CHCKWI field.
    Good Luck !!
    Regards
    Krishna Mohan

Maybe you are looking for

  • ITunes only plays one song at a time ... help please

    All of my songs are checked, but iTunes only plays one song at a time. I can't figure out why. Any suggestions? It just started doing this.

  • Runtime Error when trying to trigger smartform from VL03N

    Hi all, i am having a runtime error while trying to triger my smartforms from transaction VL03N. The error is 'The current ABAP program "SAPLV60U" had to be terminated because it has come across a statement that unfortunately cannot be executed.' The

  • My iTunes library wont finish library update. How can I fix this?

    The update begins, gets about an inch of green on the status/update bar (itunes helper) and then itunes freezes. The freeze slows down my whole system dramatically. It is a system wide error. I have reinstalled itunes x 3.

  • ITunes 10.4.1  on Osx 10.6.8  starting spontaneously

    For the last week or so, iTunes has been spontaneously starting.  I do NOT have any iTunes plugins, and don't have an CD's in the machine or any other devices connected to the iMac, I don't even have my iPod plugged into the iMac.   I see that this i

  • Counter Question

    Sorry I know this is probably obvious. I am doing an EXISTS type query within an Oracle 10.2.0.3 Procedure: v_count NUMBER:=0; c1 = Get 'y' into cursor SELECT 1 INTO v_count FROM dual WHERE EXISTS (select x from tablea where x = y); update tableb set