Error in union

SELECT distinct m_product_id,m_locator_id, sum(movementqty) AS opstk,to_char('0') as clstk,to_char('0') as movementqty,to_char('0')as MI,to_char('0') as INV,to_char('0') as GR,to_char('0') as GS,to_char('0') as MO
from m_transaction
where m_product_id='1136094' and m_locator_id='1000021'
and movementdate < '09-oct-2010'
GROUP BY m_product_id,m_locator_id
union
SELECT distinct m_product_id,m_locator_id, to_char('0') as opstk,sum(movementqty) AS clstk,to_char('0') as movementqty,to_char('0')as MI,to_char('0') as INV,to_char('0') as GR,to_char('0') as GS,to_char('0') as MO
from m_transaction
where m_product_id='1136094' and m_locator_id='1000021'
and movementdate <'22-oct-2010'
GROUP BY m_product_id,m_locator_id
when using this query it shows error message in oracle 10g
"expression must have same datatypes as corresponding expression"
How to rectify it.
please give suggestions urgent.

Hi,
you use sum, but in the opposite select a "to_char('0')", so the first one will be number, the second a char. Use just a "0" for the opposite of the sum:
SELECT distinct m_product_id,m_locator_id, sum(movementqty) AS opstk, 0 as clstk, 0 as movementqty, 0 as MI, 0 as INV,0 as GR,0 as GS,0 as MO
from m_transaction
where m_product_id='1136094' and m_locator_id='1000021'
and movementdate <'22-oct-2010'
GROUP BY m_product_id,m_locator_id
union
SELECT distinct m_product_id,m_locator_id, 0 as opstk,sum(movementqty) AS clstk, 0 as movementqty, 0 as MI, 0 as INV, 0 as GR,0 as GS,0 as MO
from m_transaction
where m_product_id='1136094' and m_locator_id='1000021'
and movementdate <'22-oct-2010'
GROUP BY m_product_id,m_locator_idHerald ten Dam
http://htendam.wordpress.com

Similar Messages

  • Error on union with order by clause

    here is my sql.
    i want sort this sql by start_timestamp.
    select name,
    enumber,
    to_char(new_time(start_TimeStamp,'gmt','edt'),'MM/DD/YY HH24:MI:SS'),
    ssn
    from emp
    where
    ename = 'joh%'
    and
    start_TimeStamp9 > TO_DATE('2007-01-15 00:00:01','YYYY-MM-DD HH24:MI:SS')
    and end_TimeStamp11 < TO_DATE('2007-01-18 22:59:59','YYYY-MM-DD HH24:MI:SS')
    union
    select name,
    enumber,
    to_char(new_time(start_TimeStamp,'gmt','edt'),'MM/DD/YY HH24:MI:SS'),
    ssn
    from emp
    where
    ename = 'joh%'
    and
    start_TimeStamp9 > TO_DATE('2007-01-15 00:00:01','YYYY-MM-DD HH24:MI:SS')
    and end_TimeStamp11 < TO_DATE('2007-01-18 22:59:59','YYYY-MM-DD HH24:MI:SS')
    union
    select name,
    enumber,
    to_char(new_time(start_TimeStamp,'gmt','edt'),'MM/DD/YY HH24:MI:SS'),
    ssn
    from emp
    where
    ename = 'kris%'
    and
    start_TimeStamp9 > TO_DATE('2007-01-15 00:00:01','YYYY-MM-DD HH24:MI:SS')
    and end_TimeStamp11 < TO_DATE('2007-01-18 22:59:59','YYYY-MM-DD HH24:MI:SS')
    union
    select name,
    enumber,
    to_char(new_time(start_TimeStamp,'gmt','edt'),'MM/DD/YY HH24:MI:SS'),
    ssn
    from emp
    where
    ename = 'wal%'
    and
    start_TimeStamp9 > TO_DATE('2007-01-15 00:00:01','YYYY-MM-DD HH24:MI:SS')
    and end_TimeStamp11 < TO_DATE('2007-01-18 22:59:59','YYYY-MM-DD HH24:MI:SS')
    order by 3;
    i got this error.
    ORA-01785: ORDER BY item must be the number of a SELECT-list expression
    start_timestamp is the 3rd column of the sql.
    why i am getting this error.
    i tried this also.
    order by to_char(new_time(start_TimeStamp,'gmt','edt'),'MM/DD/YY HH24:MI:SS');
    still i got error.

    Also, be ready for a few surprises when you try to sort dates as strings (by using TO_CHAR):
    test@XE> alter session set nls_date_format = 'mm/dd/yyyy hh24:mi:ss';
    Session altered.
    test@XE>
    test@XE> --
    test@XE> -- incorrect order
    test@XE> --
    test@XE> select num, dt
      2  from (
      3    select 1 as num, to_char(new_time(to_date('10/12/01 07:20:33',
      4                                              'mm/dd/yy hh24:mi:ss'),'gmt','edt')) as dt from dual
      5    union
      6    select 2, to_char(new_time(to_date('07/22/07 08:10:23',
      7                                       'mm/dd/yy hh24:mi:ss'),'gmt','edt')) as dt from dual
      8    union
      9    select 3, to_char(new_time(to_date('11/29/99 15:34:49',
    10                                       'mm/dd/yy hh24:mi:ss'),'gmt','edt')) from dual
    11  )
    12  order by dt;
           NUM DT
             2 07/22/2007 04:10:23
             1 10/12/2001 03:20:33
             3 11/29/2099 11:34:49
    test@XE>
    test@XE> --
    test@XE> -- correct order
    test@XE> --
    test@XE> select num, dt
      2  from (
      3    select 1 as num, new_time(to_date('10/12/01 07:20:33',
      4                                      'mm/dd/yy hh24:mi:ss'),'gmt','edt') as dt from dual
      5    union
      6    select 2, new_time(to_date('07/22/07 08:10:23',
      7                               'mm/dd/yy hh24:mi:ss'),'gmt','edt') from dual
      8    union
      9    select 3, new_time(to_date('11/29/99 15:34:49',
    10                               'mm/dd/yy hh24:mi:ss'),'gmt','edt') from dual
    11  )
    12  order by dt;
           NUM DT
             1 10/12/2001 03:20:33
             2 07/22/2007 04:10:23
             3 11/29/2099 11:34:49
    test@XE>
    test@XE>I'd say it's best to sort dates as dates always, and never as strings.
    isotope

  • SQL query error using Union

    Hello!
    I need some correction in the following query. I am trying to make a 2 page QPLD so I am joining 2 queries and then printing the report into 2 pages.
    SELECT T0.[U_OANumber], T0.[custmrName], T0.[U_Inspection], T0.[U_Cust_PO_Num],
    T0.[U_ModelType], T0.[U_Duty], T0.[U_NamePlate],
    T0.[U_Indicator_Obs], T0.[U_Fastners], T0.[U_Mounting_Type], T0.[U_Casing_Orientation], T0.[U_Impeller_Dia],
    T0.[U_Bearing_Style], T0.[U_Motor_HP_Size], T0.[U_InsulationWedges], T0.[U_Varnish], T0.[U_Paint_Shade],
    T0.[U_PlugsSeal], T0.[U_Remarks], T0.[U_Despatch]
    FROM OINS T0 WHERE T0.[U_OANumber] = '[%0]' or  T0.[customer] = '[%1]' or T0.[manufSN] = '[%2]'
    Union all
    SELECT T0.[U_ModelType], T0.[U_Size], T0.[U_Discharge], T0.[U_Head], T0.[U_RPM], T0.[U_YOM], T0.[U_HP],
    T0.[U_Amps], T0.[U_Insulation_Class], T0.[U_Winding_Connection]
    FROM OINS T0 WHERE
    T0.[U_OANumber] = '[%0]' or  T0.[customer] = '[%1]' or T0.[manufSN] = '[%2]'
    Do I have to use the where clause just once since it is identical to both statements?
    I get the error stating that all queries using Union, Intersect or Except must have an equal number of expressions. what does this mean?
    scorp
    Edited by: scorpion 666 on Feb 12, 2009 1:30 PM

    Union has to have exact same numbers of fields to combine two results.  Your query shows no need of union because your where clauses are identical.
    Right syntax would be like this:
    SELECT T0.[U_OANumber], T0.[custmrName], T0.[U_Inspection], T0.[U_Cust_PO_Num],
    T0.[U_ModelType], T0.[U_Duty], T0.[U_NamePlate],
    T0.[U_Indicator_Obs], T0.[U_Fastners], T0.[U_Mounting_Type], T0.[U_Casing_Orientation], T0.[U_Impeller_Dia],
    T0.[U_Bearing_Style], T0.[U_Motor_HP_Size], T0.[U_InsulationWedges], T0.[U_Varnish], T0.[U_Paint_Shade],
    T0.[U_PlugsSeal], T0.[U_Remarks], T0.[U_Despatch], T0.[U_Size], T0.[U_Discharge], T0.[U_Head], T0.[U_RPM], T0.[U_YOM], T0.[U_HP],
    T0.[U_Amps], T0.[U_Insulation_Class], T0.[U_Winding_Connection]
    FROM DBO.OINS T0 WHERE T0.[U_OANumber] = '[%0]' or  T0.[customer] = '[%1]' or T0.[manufSN] = '[%2]'
    Thanks,
    Gordon

  • Order by error in union

    When I want to sort an union query by using substr I get the error ora-01785. I have tried to solve the problem but still I can't solve it. pls help...
    select count(*), dealer.locid ,locname
    from dealer,loc
    where dealer.locid=loc.locid
    group by dealer.locid,locname
    union
    select count(*)-1,locid,locname
    from loc
    where locid not in(select dealer.locid
    from dealer,loc
    where dealer.locid=loc.locid
    group by locid,locname
    order by substr(locname,2,5) <<---- ora-01785

    Achyot,
    I think in the two queries you should select the same set of data.But in your query
    select count(*), dealer.locid ,locname --you have selected count(*), dealer.locid ,locname
    from dealer,loc
    where dealer.locid=loc.locid
    group by dealer.locid,locname
    union
    select count(*)-1,locid,locname --dealer is missing here
    from loc
    where locid not in(select dealer.locid
    from dealer,loc
    where dealer.locid=loc.locid
    group by locid,locname
    order by substr(locname,2,5)
    In the 2 nd query select dealer also. I don't think the problem is with substr.Try it.
    I saw by mistake dealer,locid.Never mind.
    Message was edited by:
    Manas

  • Invalid Indentifier error using UNION ALL?

    Can someone tell me why this would give me the error: ORA-00904: "WAIT_TIME": invalid identifier.
    It must be something with the UNION ALL because it works fine if i run just one of the queries at a time.
    Thanks
    Deanna
    selecT WAIT_TIME||'Minutes.'||','||COUNT(WAIT_TIME)as "0-10Min,COUNT"
    froM MOTOR_ASSIST2
    WHERE WAIT_TIME BETWEEN 0 AND 10 and ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    UNION ALL
    select WAIT_TIME||'Minutes.'||','||COUNT(WAIT_TIME)as "11-30Min,COUNT"
    froM MOTOR_ASSIST2
    where WAIT_TIME BETWEEN 11 AND 30 and ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    UNION ALL
    select WAIT_TIME||'Minutes.'||','||COUNT(WAIT_TIME)as "31-60Min,COUNT"
    from MOTOR_ASSIST2
    where WAIT_TIME BETWEEN 31 AND 60 and ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    UNION ALL
    select WAIT_TIME||'Minutes.'||','||COUNT(WAIT_TIME) as "61Min+,COUNT"
    from MOTOR_ASSIST2
    where WAIT_TIME BETWEEN 61 AND 1000 and ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    GROUP BY WAIT_TIME
    ORDER BY WAIT_TIME;

    Data
    1(Min)
    1(Min)
    1(Min)
    2(Min)
    5(Min)               
    9(Min)
    9(Min)
    9(Min)               
    10(Min)               
    11(Min)               
    15(Min)     
    17(Min)
    20(Min)
    30(Min)
    60(Min)
    99(Min)
    999(Min)
    Output
                    _0-10MIN                     11-30MIN                     31-60MIN                     61+MIN_
         1(Min):Count:3     11(Min):Count:1     60(Min):Count:1     99(Min):Count:1
         9(Min):Count:3     20(Min):Count:1                          999(Min):Count:1
         2(Min):Count:1     15(Min):Count:1                         
         10(Min):Count:1     30(Min):Count:1          
         5(Min):Count:1     17(Min):Count:1
    Total:     Count: 9                     Count:5                     Count:1                     Count:2
    Query
    WITH c1 as (select row_number() over (order by wait_time)as rn
                          ,CASE WHEN wait_time BETWEEN 0 AND 10 THEN WAIT_TIME||'(Min):Count:'||COUNT(*) ELSE NULL END AS "0-10MIN"
                    from MOTOR_ASSIST2
                    where wait_time between 0 and 10 AND ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    group by wait_time
    ORDER BY WAIT_tIME)
            ,c2 as (select row_number() over (order by wait_time) as rn
                          ,CASE WHEN wait_time BETWEEN 11 AND 30 THEN wait_time||'(Min):Count:'||COUNT(*) ELSE NULL END AS "11-30MIN"
                    from MOTOR_ASSIST2
                   where wait_time between 11 and 30 AND ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    group by wait_time
    ORDER BY WAIT_TIME)
           ,c3 as (select row_number() over (order by wait_time) as rn
                         ,CASE WHEN wait_time BETWEEN 31 AND 60 THEN wait_time||'(Min):Count:'||COUNT(*) ELSE NULL END AS "31-60MIN"
                   from MOTOR_ASSIST2
                   where wait_time between 31 and 60 AND ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    group by wait_time
    ORDER BY WAIT_TIME)
           ,c4 as (select row_number() over (order by wait_time) as rn
                         ,CASE WHEN wait_time >= 61 THEN wait_time||'(Min):Count:'||COUNT(*) ELSE NULL END AS "61+MIN"
                   from MOTOR_ASSIST2
                   where wait_time >= 61 AND ((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    group by wait_time
    ORDER BY WAIT_TIME)
    ,cgrand as (select row_number() over (order by wait_time) as rn,COUNT(WAIT_TIME)AS "TOTAL",wait_time||'(Min):Total:'||COUNT(*) as "TOTAL_WAIT_TIME"
                  from motor_assist2
                  where((:p53_fiscal_yr IS NULL
    OR :p53_fiscal_yr = TO_CHAR (ADD_MONTHS (datetime, 6), 'YYYY'))
    OR (:p53_month IS NULL OR :P53_month = TO_CHAR(DATETIME,'MM')
    AND (:p53_year IS NULL OR :p53_year = TO_CHAR(DATETIME,'YYYY'))))
    group by wait_time
    ORDER BY WAIT_TIME)
    select "0-10MIN","11-30MIN", "31-60MIN", "61+MIN","TOTAL_WAIT_TIME","TOTAL"
       from cgrand
          LEFT OUTER JOIN c1 ON  c1.rn = cgrand.rn
          LEFT OUTER JOIN c2 ON  c2.rn = cgrand.rn
          LEFT OUTER JOIN c3 ON  c3.rn = cgrand.rn
          LEFT OUTER JOIN c4 ON  c4.rn = cgrand.rn
           order by "TOTAL";                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • ODI11g Union error

    Hi ALl,
    When I try tp do the union operation in ODI 11g in two tables from the same schema. I am getting the following error and in the code it s is not taking the Union while it is inserting to I$ table.can anyone help me with this

    Hi,
    I am getting the follwoing error on union of two tables from same schema and target table is belongs to another schema..
    Source 1 : SCHEMA A
    Source 2 : SCHEMA A
    Target : SCHEMA B
    ODI-1228: Task INF_claim_DIM (Integration) fails on the target ORACLE connection ODS_DDS.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00904: "C3_CLAIM_CODE": invalid identifier
    ODI CODE at Insert flow into I$ table : Note : It is not showing the union
    insert into ODS_DDS.I$_CLAIM_DIM
         CLAIM_NAME,
         CLAIM_DESCRIPTION,
         CLAIM_CODE
    select
         C1_CLAIM_NAME,
         C2_CLAIM_DESCRIPTION,
         C3_CLAIM_CODE
    from _     ODS_DDS.C$_1CLAIM_DIM
    where     
         (1=1)
    The ODI process created two work tables C$_0 tablename with columns C1,C2,C3 and another table C$_1tablename with C4,C5,C6 columns.
    But when the process inserting into I$(integration) it was trying to get data from C$_1 with C1,C2,C3 columns so throwing an error as invalid identifier C1.
    because C1,C2,C3 columns from C$_0 not in C$_1tablename work table
    Please help me
    Thanks

  • Evaluate function problem

    I have a problem with EVALUATE function in OBIEE.
    I passed two parameters. Number is numeric and Name is varchar.
    Evaluate('DWH.PKG_ITEM_FUNCTION.PS_LAW(%1,%2)', "Book"."Item"."Number", "Book"."Item"."Name" )
    I get the following error:
    [nQSError: 22027] Union of non-compatible types.
    How can I solve this?
    Many thanks in advance.

    hi stanisa,
    It is a bug in 10g,here it goes
    --> While using Evaluate function, common errors like “Union of non-compatible types. (HY000)”.
    I believe this is a bug in the Evaluate function implementation. One must cast all the arguments to the same data type before passing them as arguments.
    Courtesy :- http://oraclebizint.wordpress.com/2007/10/18/oracle-bi-ee-101332-top-10-common-errors/
    hope helps you.
    Cheers,
    KK

  • Error while using Group By on 2 Querys joined by union

    Hello Everyone
    I have a situation where in one report i cannot group the data and in another report when i group the data i am unable to view subject area.
    I Had a Complex Request from my client , i have to claculate a report based on 2 dimensions i.e i am calculating 2 measures from one dimension and other 3 measures from other dimension and then using UNION to join both the querys , for the same description the data is being displayed in 2 rows , then i i tried to combine both the querys from union and trying to select from those then i am getting the result and the problem is i am unable to access the subject area , its giving "Either you do not have permission to use the subject area within Answers, or the subject area does not exist." Error , i am unable to add prompts to these request
    I want the investor Grants Row to be displayed in one Column , I am already using Group by in one of the querys.
    Study                      Cost            Approved         Committed                 Earned          Paid Balance
    Investigator Grants 350,000.00 113,770.78 0.00 0.00 0.00
    Investigator Grants 350,000.00 113,770.78 42,403.13 19,905.90 22,497.23
    Labs 23,000.00 0.00 0.00 0.00 0.00
    Study Drug 47,000.00 0.00 0.00 0.00 0.00
    Other 0.00 0.00 0.00 0.00 0.00
    Here is my query
    SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration"."Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, SUM (IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) BY "- Administration"."Study Cost" ) saw_11, SUM(IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_12, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_13, SUM(IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_14, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0)-IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248') UNION SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration". "Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) saw_11, IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) saw_12, 0.00 saw_13, 0.00 saw_14, 0.00 saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Protocol"."Protocol #" = 'P31248') AND ("- Administration". "Display Currency Code" = 'USD') ORDER BY saw_16 DESC
    Any help is appreciated ..!
    ~Srix

    Here is the query i used to group the data but i cannot access Answers with this query
    SELECT saw_0 saw_0, saw_1 saw_1, saw_2 saw_2, saw_3 saw_3, saw_4 saw_4, saw_5 saw_5, saw_6 saw_6, saw_7 saw_7, saw_8 saw_8, saw_9 saw_9, saw_10 saw_10, SUM(saw_11 BY saw_10) saw_11, SUM(saw_12 BY saw_10 ) saw_12, SUM(saw_13 BY saw_10) saw_13, SUM(saw_14 BY saw_10) saw_14, SUM(saw_15 BY saw_10) saw_15, saw_16 saw_16 FROM (SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration"."Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, SUM (IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) BY "- Administration"."Study Cost" ) saw_11, SUM(IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_12, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_13, SUM(IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_14, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0)-IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248') AND ("- Payment"."Payment Number"="- Payment"."Related Payment Request Number")
    UNION SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration". "Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) saw_11, IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) saw_12, 0.00 saw_13, 0.00 saw_14, 0.00 saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248')) T GROUP BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6, saw_7, saw_8, saw_9, saw_10 , saw_11, saw_12, saw_13, saw_14, saw_15, saw_16 ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6

  • Error while executing UNION ALL query

    Hello everyone,
    I'm executing the below query on Oracle 9.2.0.8 version.
    select hdr.*
    from ttl_hdr hdr, ttl_service ser
    where hdr.cus_nbr = ser.cus_nbr
    and hdr.dn in ('1232','2342',343','343')
    union all
    select hdr.*
    from ttl_hdr_his hdr, ttl_service ser
    where hdr.cus_nbr = ser.cus_nbr
    and hdr.dn in ('1232','2342',343','343')
    and I encounter following error:
    ORA-01790: expression must have same datatype as corresponding expression
    But instead of * if I'm specifying a list of few columns, it executes the query properly.
    Can anybody tell me what the problem is ?
    regards,
    Rossy

    Hi,
    All columns in your tables TTL_HDR and TTL_HDR_HIS are not with same data type.
    I'm sure you get same error if you specify all columns that * brings.
    Specify column names and use conversion function to get data type same to column from both selects.
    PS: and I think this is not Application Express related
    Br, Jari

  • Re Creating  a chart getting an error with a 'Union All' statement

    Hi
    I have some data to chart with the following fields;
    Product , Jul-08 , Aug-08, Sep-08 etc ...... to Jan-10.
    The PRODUCT field is text showing the numerous Product Names
    The Jul-08 & other month fields have numbers per product that is to be aggregated for that month & plotted on the line graph.
    My SQL to create the first point on the chart is as below;
    select null link, PRODUCT label, SUM(JUL-08) "FFF"
    from "SCHEMANAME"."TABLENAME"
    WHERE PRODUCT = 'FFF'
    GROUP by PRODUCT
    ORDER BY PRODUCT
    This works fine until I want add the second point of this line graph using a 'union all' join as follows;
    select null link, PRODUCT label, SUM(JUL_08) "FFF"
    from "SCHEMANAME"."TABLENAME"
    WHERE PRODUCT = 'FFF'
    UNION ALL
    select null link, PRODUCT label, SUM(AUG_08) "FFF"
    from "SCHEMANAME"."TABLENAME"
    WHERE PRODUCT = 'FFF'
    I can't work out how I can join the other months on the line graph in one series.
    The error is as follows;
    1 error has occurred
    Failed to parse SQL query:
    select null link, PRODUCT label, SUM(OCT_09) "NCDS - STD" from "BI_A_DATA"."CDW_VS_NCDS_CALLS" WHERE PRODUCT = 'NCDS - STD' UNION ALL select null link, PRODUCT label, SUM(NOV_09) "NCDS - LOCAL" from "BI_A_DATA"."CDW_VS_NCDS_CALLS" WHERE PRODUCT = 'NCDS - LOCAL'
    ORA-00937: not a single-group group function
    Certain queries can only be executed when running your application, if your query appears syntactically correct, you can save your query without validation (see options below query source).
    Can anyone assist?
    I want a continuous Line Graph that shows all the months from Jul-08 , Aug-08, Sep-08 etc ...... to Jan-10 for the same product.
    I will then add other series for the other products, Thanks

    OK, I thought each month would be separated by the different months in each selct subquery, but I see what you mean.
    I'm creating a line graph for various PRODUCTS that has a numeric value for each month, from JUL_08 ..... for a number of months.
    I want a LINE graph that shows the different totals each month for that PRODUCT.
    The error advises that there are more values in the SELECT statement than the expected and to use Use the following syntax:
    SELECT LINK, LABEL, VALUE
    FROM ...
    I then went on to use the '[ ]' brackets to separate data but this didn't fix the problem.
    I've changed the script to suit as per your 'PERIOD' addition but now have the error as per below;
    error script
    1 error has occurred
    Invalid chart query: SELECT null link, PRODUCT label, PERIOD, SUM(ABC) FROM (SELECT null link, PRODUCT, 'JUL_08' PERIOD,SUM(JUL_08)ABC FROM BI_A_DATA.APEX_TEST WHERE PRODUCT = 'ABC' GROUP BY PRODUCT UNION ALL SELECT null link, PRODUCT, 'AUG_08' PERIOD,SUM(AUG_08)ABC FROM BI_A_DATA.APEX_TEST WHERE PRODUCT = 'ABC' GROUP BY PRODUCT UNION ALL SELECT null link, PRODUCT, 'SEP_08' PERIOD,SUM(SEP_08)ABC FROM BI_A_DATA.APEX_TEST WHERE PRODUCT = 'ABC' GROUP BY PRODUCT) GROUP BY link, PRODUCT, PERIOD
    Use the following syntax:
    SELECT LINK, LABEL, VALUE
    FROM ...
    Or use the following syntax for a query returning multiple series:
    SELECT LINK, LABEL, VALUE1 [, VALUE2 [, VALUE3...]]
    FROM ...
    LINK URL
    LABEL Text that displays along a chart axis.
    VALUE1, VALUE2, VALUE3... Numeric columns that define the data values.
    Note: The series names for Column and Line charts are derived from the column aliases used in the query.
    My script amended;
    SELECT null link, PRODUCT label, PERIOD, SUM(ABC)
    FROM
    (SELECT null link, PRODUCT, 'JUL_08' PERIOD,SUM(JUL_08)ABC
    FROM BI_A_DATA.APEX_TEST
    WHERE PRODUCT = 'ABC'
    GROUP BY PRODUCT
    UNION ALL
    SELECT null link, PRODUCT, 'AUG_08' PERIOD,SUM(AUG_08)ABC
    FROM BI_A_DATA.APEX_TEST
    WHERE PRODUCT = 'ABC'
    GROUP BY PRODUCT
    UNION ALL
    SELECT null link, PRODUCT, 'SEP_08' PERIOD,SUM(SEP_08)ABC
    FROM BI_A_DATA.APEX_TEST
    WHERE PRODUCT = 'ABC'
    GROUP BY PRODUCT)
    GROUP BY link, PRODUCT, PERIOD

  • Error when I change UNION to UNION ALL

    Hi,
    In the SQL below, I have a union in which I dont care about duplicates (in fact I know there wont be any). Hence, I want to avoid any overhead of sorting and checking for same, by replacing it with UNION ALL. The SQL runs fine with UNION, but complains when I change it to UNION ALL, which I cannot explain. The error message is "Error: java.sql.SQLException: ORA-00936: missing expression, SQL State: 42000, Error Code: 936"
    Here is the SQL:
    SELECT activ_I, activ_C, cases.I_OCCASTYP_CASES, cases.C_OCCASTYP_CASES FROM TOCCASE cases JOIN (
    SELECT I activ_I, C activ_C, I_OCCASE_RESULTINGFROM, C_OCCASE_RESULTINGFROM FROM TOCPROCESSINSTANCE activ JOIN (
    SELECT I_OCACTVTY_CHANGES, C_OCACTVTY_CHANGES FROM TOCTransferActivityChange x
    WHERE I_TO IN (2)
    AND C_TO = 1009
    AND CHANGEDATE <= to_date('2009-05-16 00:00:00','YYYY-MM-DD HH24:MI:SS')
    AND CHANGEDATE = (SELECT MAX(z.CHANGEDATE) FROM TOCTransferActivityChange z WHERE z.I_OCACTVTY_CHANGES = x.I_OCACTVTY_CHANGES AND z.C_OCACTVTY_CHANGES = x.C_OCACTVTY_CHANGES)
    ) latest_user_tx ON activ.I = latest_user_tx.I_OCACTVTY_CHANGES AND activ.C = latest_user_tx.C_OCACTVTY_CHANGES
    WHERE activ.C = 11200 AND activ.I_OCCASE_RESULTINGFROM IS NOT NULL AND activ.C_OCCASE_RESULTINGFROM IS NOT NULL
    UNION ALL (
    SELECT I activ_I, C activ_C, I_OCCASE_RESULTINGFROM, C_OCCASE_RESULTINGFROM FROM TOCTASK activ JOIN (
    SELECT I_OCACTVTY_CHANGES, C_OCACTVTY_CHANGES FROM TOCTransferActivityChange x
    WHERE I_TO IN (2)
    AND C_TO = 1009
    AND CHANGEDATE <= to_date('2009-05-16 00:00:00','YYYY-MM-DD HH24:MI:SS')
    AND CHANGEDATE = (SELECT MAX(z.CHANGEDATE) FROM TOCTransferActivityChange z WHERE z.I_OCACTVTY_CHANGES = x.I_OCACTVTY_CHANGES AND z.C_OCACTVTY_CHANGES = x.C_OCACTVTY_CHANGES)
    ) latest_user_tx ON activ.I = latest_user_tx.I_OCACTVTY_CHANGES AND activ.C = latest_user_tx.C_OCACTVTY_CHANGES
    WHERE activ.C = 11554 AND activ.I_OCCASE_RESULTINGFROM IS NOT NULL AND activ.C_OCCASE_RESULTINGFROM IS NOT NULL
    ) activity_transfers ON activity_transfers.I_OCCASE_RESULTINGFROM = cases.I AND activity_transfers.C_OCCASE_RESULTINGFROM = cases.C
    If I run the UNION ALL as is without the join to TOCCASE it works fine as well. The columns in each part of the union are the same so I have no idea why its failing.
    I am running the following version of Oracle:
    "Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production" (as returned from "select * from v$version")
    thanks for any info
    Edited by: user11176141 on 18-May-2009 03:15

    Thanks for the input!
    When I remove the bracket after the ALL keyword, I get the an error "Error: java.sql.SQLException: ORA-00920: invalid relational operator
    , SQL State: 42000, Error Code: 920". I assume this is because I had a corresponding closing bracket, so I removed that as well. However, I now get the error "Error: java.sql.SQLException: ORA-00920: invalid relational operator, SQL State: 42000, Error Code: 920". so as it is now the SQL reads
    SELECT activ_I, activ_C, cases.I_OCCASTYP_CASES, cases.C_OCCASTYP_CASES FROM TOCCASE cases JOIN (
    SELECT I activ_I, C activ_C, I_OCCASE_RESULTINGFROM, C_OCCASE_RESULTINGFROM FROM TOCPROCESSINSTANCE activ JOIN (
    SELECT I_OCACTVTY_CHANGES, C_OCACTVTY_CHANGES FROM TOCTransferActivityChange x
    WHERE I_TO IN (2)
    AND C_TO = 1009
    AND CHANGEDATE <= to_date('2009-05-16 00:00:00','YYYY-MM-DD HH24:MI:SS')
    AND CHANGEDATE = (SELECT MAX(z.CHANGEDATE) FROM TOCTransferActivityChange z WHERE z.I_OCACTVTY_CHANGES = x.I_OCACTVTY_CHANGES AND z.C_OCACTVTY_CHANGES = x.C_OCACTVTY_CHANGES)
    ) latest_user_tx ON activ.I = latest_user_tx.I_OCACTVTY_CHANGES AND activ.C = latest_user_tx.C_OCACTVTY_CHANGES
    WHERE activ.C = 11200 AND activ.I_OCCASE_RESULTINGFROM IS NOT NULL AND activ.C_OCCASE_RESULTINGFROM IS NOT NULL
    UNION ALL
    SELECT I activ_I, C activ_C, I_OCCASE_RESULTINGFROM, C_OCCASE_RESULTINGFROM FROM TOCTASK activ JOIN (
    SELECT I_OCACTVTY_CHANGES, C_OCACTVTY_CHANGES FROM TOCTransferActivityChange x
    WHERE I_TO IN (2)
    AND C_TO = 1009
    AND CHANGEDATE <= to_date('2009-05-16 00:00:00','YYYY-MM-DD HH24:MI:SS')
    AND CHANGEDATE = (SELECT MAX(z.CHANGEDATE) FROM TOCTransferActivityChange z WHERE z.I_OCACTVTY_CHANGES = x.I_OCACTVTY_CHANGES AND z.C_OCACTVTY_CHANGES = x.C_OCACTVTY_CHANGES)
    ) latest_user_tx ON activ.I = latest_user_tx.I_OCACTVTY_CHANGES AND activ.C = latest_user_tx.C_OCACTVTY_CHANGES
    WHERE activ.C = 11554 AND activ.I_OCCASE_RESULTINGFROM IS NOT NULL AND activ.C_OCCASE_RESULTINGFROM IS NOT NULL
    ) activity_transfers ON activity_transfers.I_OCCASE_RESULTINGFROM = cases.I AND activity_transfers.C_OCCASE_RESULTINGFROM = cases.C

  • Union of non-compatible types error in column formula in obiee

    Hi Experts,
    Error: Union of non-compatible types
    I used Case function in my column formula and got above error as a result.
    The column formula goes below:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
    LEGID is numeric type. PAY_RECV_IND is varchar type.
    Please let me know how to resolve this error.
    Thanks in Advance.
    -Regards
    Mayuri

    898221 wrote:
    Hi Experts,
    Error: Union of non-compatible types
    I used Case function in my column formula and got above error as a result.
    The column formula goes below:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN (EDM_TRD_IR_LEG.PAY_RECV_IND) ELSE 0 END, 0)
    LEGID is numeric type. PAY_RECV_IND is varchar type.
    Please let me know how to resolve this error.
    Thanks in Advance.
    -Regards
    Mayuri@dpka, you have syntax errors in your solution. If you're casting as varchar, then your syntax should read '1' instead of 1. Also at the end, it should be '0' instead of 0.
    Mayuri,
    To use your syntax, try this:
    IFNULL(CASE WHEN EDM_TRD_IR_LEG.LEG_ID=1 THEN CAST(EDM_TRD_IR_LEG.PAY_RECV_IND AS INTEGER) ELSE 0 END, 0)
    ...if you need the result as a numeric for aggregation purposes...

  • Pipelined function with Union clause(Invalid Number(ORA-01722) error )

    Hi,
    I have a pipelined function.
    I am fetching the data with the use of a REF cursor.
    The query has two part: query1 and query2
    when I am opeing the cursor with query1 UNION query2,it is giving me Invalid Number(ORA-01722) error.
    but when I open the cursor separately for query1 and query2,I am getting the resultset for each of the query.
    query1 and query2 are running fine with UNION in the sql editor.
    But,when I put them into two variables (var1 :='query1' and var2:='query2' and try to open the cursor with var1 UNION var2 , it's giving me the error.
    But when I put query2 as 'Select ..... from dual' and then try to open the cursor for query1 UNION query2,
    then getting the result of query1 and one extra row for query2(dual).
    The FROM table set is same for query1 and query2..
    can anyone please help me , why this Invalid Number(ORA-01722) error is coming.

    query1 := 'SELECT to_char(st.store_no) STORE_NUMBER,pp.name PROGRAM_NAME, ''HBS'' DISPENSING_SYSTEM,
    pt.PATIENT_SRC_NO SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, pt.last_name PATIENT_LAST_NAME, pt.first_name
    PATIENT_FIRST_NAME, to_char(LPAD (pppd.rx_number, 7, '' '')|| ''-''|| LPAD (pppd.refill_number, 2, 0)) RX_REFILL
    FROM
    pega_patient_program_dispense pppd,pega_patient_program_reg pppr,health_care_profs hcp1,
    health_care_profs hcp2,prescription_dispenses pd,prescriptions p, pega_program_status_reason ppsr ,master_doctors md,
    prescription_disp_orders pdo, hbs_shipment_extract hse,stores st,master_stores ms,pega_programs pp,patients pt,master_patients mpt
    WHERE
    pppr.referring_hcp_id=md.id(+) and md.dispensing_system_id=hcp1.hcp_id and
    pppr.ID=pppd.PEGA_PATIENT_PROGRAM_REG_ID and pppd.prescription_dispense_id=pd.id and pd.prescriptions_id=p.id and
    p.hcp_id=hcp2.hcp_id and ppsr.ID=pppd.PEGA_PROGRAM_STATUS_REASON_ID and pppd.prescription_dispense_id = pdo.prescriptions_dispenses_id(+) AND
    pdo.shipment_number = hse.shp_no(+) and pppd.store_id=ms.id and st.id=ms.dispensing_system_id and pppr.pega_program_id=pp.id
    and pppr.patient_id=mpt.id and pt.patient_id=mpt.dispensing_system_id and pppd.dispensing_system=''HBS'' and pp.name LIKE ''REV%''
    AND
    ((pppd.prescription_dispense_id IS NOT NULL AND pppd.quantity_dispensed &gt; 0 AND pppd.reported_date IS NULL AND
    pppd.src_delete_date IS NULL AND ((pppr.program_specific_patient_code IS NULL ) OR (hcp1.last_name IS NULL) OR
    (hcp1.first_name IS NULL) OR (hcp2.first_name IS NULL) OR (hcp2.last_name IS NULL) OR (hcp2.address_1 IS NULL) OR
    (hcp2.city IS NULL) OR (hcp2.state_cd IS NULL) OR (hcp2.zip_1 IS NULL)OR (pppr.referral_date is NULL) OR
    (hcp1.state_cd IS NULL) OR (hcp1.zip_1 IS NULL)
    OR (hcp2.zip_1 IS NULL) OR (pppr.last_status_change_date IS NULL) OR (pppr.varchar_1 IS NULL) OR
    (pppr.varchar_7 IS NULL OR pppr.varchar_7 LIKE ''NOT AVAILABLE AT REFERRAL%'') OR (pppr.varchar_5 IS NULL OR
    pppr.varchar_5 LIKE ''NOT AVAILABLE AT REFERRAL%'')) ) AND ppsr.INCLUDE_ON_EXCEPTION_RPT_IND=''Y'')
    OR
    ((pppd.authorization_number IS NULL OR NVL(TRUNC(pdo.shipped_date),TRUNC(hse.shp_act_date_dt)) NOT BETWEEN
    TRUNC(pppd.date_1) AND TRUNC(pppd.date_2)) OR (pppd.varchar_4 IS NULL OR NVL(TRUNC(pdo.shipped_date),
    TRUNC(hse.shp_act_date_dt)) NOT BETWEEN TRUNC(pppd.date_3) AND TRUNC(pppd.date_5)))
    OR
    (pppr.pega_program_competitors_id IS NULL AND (ppsr.manufacturer_status=''TRIAGE'' AND ppsr.manufacturer_reason=''COMPETITOR''))
    OR
    (ppsr.manufacturer_reason IS NULL)
    query2 := ' SELECT ''150'' STORE_NUMBER,''test'' PROGRAM_NAME , ''RX2000'' DISPENSING_SYSTEM
    ,''01'' SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, ''test'' PATIENT_LAST_NAME, ''test'' PATIENT_FIRST_NAME,
    ''rx01'' RX_REFILL
    FROM
    pega_patient_program_reg pppr,health_care_profs hcp1, pega_program_status_reason ppsr ,
    master_doctors md,stores st,master_stores ms,pega_programs pp,patients pt,master_patients mpt
    WHERE
    pppr.referring_hcp_id=md.id(+) and md.dispensing_system_id=hcp1.hcp_id and
    ppsr.ID=pppr.REFERRAL_STATUS_ID and st.store_type=''M'' and pppr.store_id=ms.id and st.id=ms.dispensing_system_id
    and pppr.pega_program_id=pp.id and pppr.patient_id=mpt.id and pt.patient_id=mpt.dispensing_system_id and pp.name LIKE ''REV%''
    AND
    ((((pppr.program_specific_patient_code IS NULL ) OR (hcp1.last_name IS NULL) OR (hcp1.first_name IS NULL) OR
    (pppr.referral_date is NULL) OR (hcp1.state_cd IS NULL) OR (hcp1.zip_1 IS NULL) OR (pppr.last_status_change_date IS NULL)
    OR (pppr.varchar_1 IS NULL) OR (pppr.varchar_7 IS NULL) OR (pppr.varchar_5 IS NULL OR pppr.varchar_5 LIKE
    ''NOT AVAILABLE AT REFERRAL%'')) ) AND ppsr.INCLUDE_ON_EXCEPTION_RPT_IND=''Y'')
    OR
    (pppr.pega_program_competitors_id IS NULL AND (ppsr.manufacturer_status=''TRIAGE'' AND ppsr.manufacturer_reason=''COMPETITOR''))
    OR
    (ppsr.manufacturer_reason IS NULL)
    AND
    pppr.id NOT IN(select pppd.PEGA_PATIENT_PROGRAM_REG_ID from PEGA_PATIENT_PROGRAM_DISPENSE pppd)';
    BUT IF I put
    query2 := ' SELECT ''150'' STORE_NUMBER,''test'' PROGRAM_NAME , ''RX2000'' DISPENSING_SYSTEM
    ,''01'' SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, ''test'' PATIENT_LAST_NAME, ''test'' PATIENT_FIRST_NAME,
    ''rx01'' RX_REFILL
    FROM DUAL';
    then it is giving result.

  • 32-bit Java error with Navy Federal Credit Union eScan Deposit

    I am trying to do eScan Deposit. The first time it said it needed to download a Java applet, and I said yes, after the download was complete it still did not recognize the scanner. It gave me an error saying "This system does not support 64-Bit Java. Select 32-Bit Java". I verified with Apple Support that both 32 and 64-bit Java come with snow leeopard and the Java Prefs were correct. Could this be the printer, or is this a Navy Federal web site issue? Anyone know how to fix the problem? Thanks in advance. 

    The browser does not allow created files to be uploaded, it wants to manage that process. This worked fine for my windows latop, but I had the full HP driver installed. HP has not made one availabile yet for 10.7.2 and recommeds using the Apple drivers. I can do that fine for printing and scanning (with the Image software). But not with the application. The Credit Union sais it "should work with MAC" provided I have the right printer driver and TWAIN compliant scanner. The HP 7780is TWAIN compliant. HP recommended gong to www.twain.org and downloading TWAIN s/w for MACs. I started to, but the s/w was dated 2002 and won't help for newer MAC operating systems.

  • LOV with Select Union - ERROR 30049

    Hi, guys.
    I'm facing some troubles to deal with Select Union in a Lov.
    When I'm trying to run the forms, it shows me the error FRM-30049 in column mapping properties.
    Actually, I don't know if Forms supports it. The code below worked out in ORACLE SQLPLUS.
    Follows the code:
    SELECT (SUBSTR(cust_name,1,15) ||' - '||'Customer'),
    cust_cod
    FROM customers
    UNION
    SELECT (SUBSTR(supl_name,1,15)||' - '||'Supplier'),
    supl_COD
    FROM suppliers;
    May someone give me a hint?
    Thanks in advance.

    I'm sorry.
    I've found my error. It was just necessary adjust the column mapping long propertie.
    Now, it's working.
    Sorry, again.
    Have a nice day.
    Thanks anyway.

Maybe you are looking for

  • Mistake when opening Adobe Muse CC

    At start of Adobe Muse CC there is an error message of the following contents and the application isn't started. As it is possible to solve this problem. Thanks.

  • Did I Brick my iPhone? iOS6 Restore

    I upgraded to iOS6.....My music would not show up, nor would it play via icloud.  After a number of hard restarts, I decided to restore the iOS.  For the last 5 hours, it has been stuck in a loading mode after trying to restore (I got passed all the

  • Best reason for a built-in downloader in Bridge

    I just heard the best reason to have a photo downloader built-in to Bridge. I already own Downloader Pro from Breeze Systems which is a bit complicated to set up, but has great functionality. But, because it's not integrated into Bridge, my workflow

  • I am still having problems trying to change my security questions

    I am still having trouble trying to change my security questions and I can't figure it out

  • Poor Quality After Importing Video

    Has anyone noticed that the quality is poor after importing a DV file to iMovie?  If so, is there any way to fix this or avoid the problem altogether