Query exception

Hi!!
I update the bw to 7.0 and now I don't see the color exceptions in some querys that before ran well. I delete the standard exception and I return to create it, but I can't see the exception now. Do anyone knows what is the problem? Is posible that the problem would be something about the IGS?
Thanks a lot for your help!

Hi
just check your query and exception once. try to put same exceptions in other and see weather those exception data you have in the report or not ?
regards,
chandra.

Similar Messages

  • Dynamic query exception

    How to handle dynamic query exception
    in my dynamic query say if i pass the wrong table name it is showing some errors instead i would like to use my own error statement as output
    eg:
    mytable :test_table
    declare mytable varchar2 :=test_table1234 --(which is not present in DB)
    begin
    execute immediate ('select * from '|| mytable);
    -- Error handling here
    end;

    I wouldn't use WHEN OTHERS, not unless you want to be fired for breaking coding standards. If you insist, at least follow it with RAISE.
    Here is a an exposition of the problem, http://www.orafaq.com/wiki/WHEN_OTHERS and another http://tkyte.blogspot.co.uk/2008/06/when-others-then-null-redux.html

  • Error in Query (EXCEPT)

    Dear Experts,
    I Have Error in query
    My Query Such as:
    Select TransNum from Oinm where transType=310000001
    Except
    Select Docnum from [dbo].[Opn_Stock] where U_ TransTypeStk=310000001
    Show Error: Browse mode is invalid for statements containing a UNION, INTERSECT and EXCEPT operator.
    Note: This query smoothly run in Sql 2005 but throw Error in SAP while execute in sap query generator.
    Regards,
    Sumeet Vaity

    The SBO generally inserts a for browse line at the end of the query. But not allways! E.g. probably your query would work if you refrase it in such a way:
    Select TransNum from Oinm where transType=310000001
    Except --union
    Select Docnum from dbo.Opn_Stock where U_ TransTypeStk=310000001
    That is it does not insert this line in case of a union, even in the comment part!

  • "No results were returned by the query" exception

    Hi,
    im using postgreSql (7.2) as a backend and JDBC3 (from http://jdbc.postgresql.org/).
    im getting the exception, "No results were returned by the query" whenever i try to do an insert. the weird thing is that insert works and i can see a record in the database, but i still get this exception and i can't do anything.
    Java: 1.4.0
    thanks a lot

    you should use executeUpdate for queries that do not return result sets. that would include insert, update and delete.
    i didn't know that, that would cause a problem with postgreSql jdbc. im use to of Oracle and i never got these problems with Oracle
    this is not a problem with postgres it is a problem with your lack of understanding the API and the Oracle driver if it let's you do this is wrong.
    the API clearly states that is you try and execute a SQL statement that does not produce a ResultSet with executeQuery then a SQLException should be thrown.
    so again the postgres driver is correct you and the oracle driver are wrong.

  • Crystal Report query on top of BI Query : Exception raised in infoview

    Hi experts,
    I have created a crystal report query on ntop of a BI query and exported to BO.
      - For the BI query without variable, the crystal report runs with success in infoview and Crystal report
      -For the same BI query with a  variable, the crystal report does not run. A java exception is raised
    Please could somebody tell me what is the pb ?
    Tha

    Hi there,
    Actually i am investigating the best way to produce Cristal Clear Reports using data from BI, so Cubes, DOS, etc. As far as i know BO use BEx queries, then CR can produce Reports, but i thought it works for all cases, i mean calculation, filtering and variables.
    That's quite disapointing because i already told my client i will use his old BEx Queries to produce Reports with CR (frozen Reports), so use CR as Workbook to present them in fancy way.
    Any comments will be welcome.
    Al.

  • Named query exception JPA

    Hello
    I wrote a simple named query in my entity class which is throwing me an exception.
    @NamedQueries({
         @NamedQuery(name="custrecords",query="SELECT c FROM CustDetails c WHERE lower(c.customerName) = :customerName"),
         @NamedQuery(name="allcustrecords",query="SELECT c FROM CustDetails c")
    Exception in defaultTrace.trc file:
    The generated SQL statement is not valid for the underlying database platform (platform no. 99). For more details see attached exception. SQL statement is SELECT "C"."CUSTOMER_NO" "C_CUSTOMER_NO_customerNo","C"."CUSTOMER_NAME" "C_CUSTOMER_NAME_customerName","C"."STREET_1" "C_STREET_1_street1","C"."BUILDING_NAME" "C_BUILDING_NAME_buildingName","C"."CONTACT_NAME" "C_CONTACT_NAME_contactName","C"."POST_CODE" "C_POST_CODE_postCode","C"."CREDIT_LIMIT" "C_CREDIT_LIMIT_creditLimit","C"."COMPANY_REGN_NO" "DISPLAY_1","C"."COUNTRY" "C_COUNTRY_country","C"."VAT_REGN_NO" "C_VAT_REGN_NO_vatRegnNo" FROM "TMP_CUST_DETAILS" "C" WHERE LOWER("C"."CUSTOMER_NAME") = ?#
    com.sap.engine.lib.injection.InjectionException: Injection on field em of instance com.centrica.scv.service.CustomerBean@1d53bb failed. Could not get a value to be injected from the factory.
    I am using MAX DB.
    Can some one tell me how to resolve this.
    Thanks
    Vidyadhar

    Hi Vidyadhar,
    it seems that you are running SAP JPA on Open SQL for Java. Open SQL for Java does not support the lower function:
    http://help.sap.com/saphelp_nwce72/helpdata/en/9b/f46cabaa874bc9a82234e8cf1d0696/frameset.htm
    Hence, lower cannot be mapped on Open SQL for Java. I reccomend that you add an additional attribute to keep the customerName in a normalized form and do the normalization in Java.
    For other restrictions using SAP JPA on the System Data Source and on Open SQL please have a look at this page:
    http://help.sap.com/saphelp_nwce72/helpdata/en/1c/0131b37d604f759fdb3dc9779b0b95/frameset.htm
    -Adrian

  • Bex Query Exception Not Appearing In Bex Report

    I have a created an exception in a Bex Query and built a report using the Bex Report Designer. But the exceptions that work fine in the query dont seem to work once I've embedded the query in a report. Is this right? is it not possible to use exceptions in a report or do I need to turn something on etc?
    Any help much apreciated.

    Hi Joel,
    Pls refer the OSS # 331772 reg. this limitation. Exceptions if applied will not be dynamic in RD.
    Report designer is a flat structure. You cannot collapse or expand the static columns. Hence, Conditions/Exceptions are not supported in Report Designer. You may try alternatively in WAD. It will surely work in WAD for formatted web based reports.
    Thanks,
    Arun Bala

  • Query Exception Expert Opinion Needed

    HI
    WE have this particular case we are yet to find a problem on, your assistance with this would be awesome.
    SO the problem is as follows:
    - we have two Key figure (K1 & K2)
    - Many conditions based on the two key figures should be shows in different colours
    Ex:
    Green - k1 (85 % or Greater) and K2 (Between -5% and +5%)
    Blue - K1 (80% or Greater)  and K2 (Between -8% and +8%)
    White - K1 (75% or Greater) and K2 (Between -10% and +10%)
    Red - Everything else in Red.
    Thanks you for your help with this....
    D

    Hi Darshak,
    Green - k1 (85 % or Greater) and K2 (Between -5% and +5%)
    Blue - K1 (80% or Greater) and K2 (Between -8% and +8%)
    White - K1 (75% or Greater) and K2 (Between -10% and +10%)
    Red - Everything else in Red.
    To achieve this you need to create exceptions in the query designer.
    Create a exception as named "Green K1"
    Green >select Good 1 in alert level>operator ">">Values "85%">click transfer
    and create one more "Green K2"
    select Good 1 in alert level>operator "between">Values "-5% and +5%"-->Click transfer
    Like this do to other colors also ... but you cannot achieve the BLUE, WHITE colors.
    You have only 3 colors, Green, Yellow, Red.
    If you want other than this then you need to work on the Excel Macros... Which is lengthy and trouble some process.
    Regards,
    Ravi Kanth

  • Bex Query Exception Storage

    Hi,
    we have developed a program that execute queries in background and display an alert to the user according the exception defined in the queries.
    At the moment we have replicated all information related to the exception defined in the Bex queries because we didn't find where the system stores the bex exceptions definition.
    Is there any table in SAP BW that cointain this information?
    We'd like to avoid to replicate the exception information and we want use the exception definition we set in the Bex queries.
    Thx

    Hi,
    Why cant you use standrart reporting agent(till 3.1) or information broadcasting for same..? instead of Program..?
    Srini

  • Query exception (comparison individual and global results)

    Hi Experts,
    Please can anyone tell me how can I implement the following:
    There is a KF "A".
    I'd like to change the color of the cell in result of the comparison with the global result.
    For example : if the individual value > Global result then green.
    Please help.

    Asika,
    Welcome to SDN..
    Basically you will have to uniquely identify the cells that have the necessary condition...
    Have a third column which is a 1 or a 0 depending on the value of KFA and then apply your exception to the same - use the if statement in formula
    Hope it helps..
    Arun
    Assign points if helpful

  • Query on Sales Order Analysis

    Dear Experts
    I have written a Query for Sales Order Analysis and would like to have help on this.
    The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]
    After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. Everything is fine with this query except I would also like to incdude the total number of Sales Order (per day) right below the column "DocNum".
    Is it possible to achieve this?
    Thank You
    Regards
    Elton

    Try this:
    SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
    Union ALL
    SELECT count(DocDate), SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
    FROM ORDR T0 WHERE T0.[DocDate] =[%0]

  • Add subquery to main query in Report Builder 6i

    Usually, when you add a subquery to an existing query in a report, you'll see the query in data model marked by a paper clip icon with a forward slash across it (means "Subquery Inside"). All current field names in current query (except CF and CS) will have a '1' appended after it (CF and CS fields are not affected), but in your sql, the column names stay the same. So there is an out-of-sync situation with the column names.
    To fix this:
    1) before change anything, back up old report somewhere else
    2) copy the original query somewhere else as backup
    3) open the query in Report Builder
    4) wipe out the query, replace it by "select 1 from dual" to reset it and press ok.
    5) replace "select 1 from dual" with your new query with an embedded subquery.
    6) All field names will be without the '1' appendix.
    7) check all the CS fields, the source should be reset to null. Redefine the CS fields using backed up report as reference. CF fields are not affected.
    8) move the fields and restore the break orders according to backed up report.
    9) Recompile whole report.
    10) save report again and you're done.
    Maybe you don't need this in the latest version of Report Builder, but in 6i, this is what I do.

    If you use aliases for your item names in your original query you avoid this problem....
    eg
    Select field1 item1, field2 item2 from table.....
    item 1 and item2 will stay in your layout between query changes.
    D

  • How I can change this query, so I can display the name and scores in one r

    How I can change this query, so I can add the ID from the table SPRIDEN
    as of now is giving me what I want:
    1,543     A05     24     A01     24     BAC     24     BAE     24     A02     20     BAM     20in one line but I would like to add the id and name that are stored in the table SPRIDEN
    SELECT sortest_pidm,
           max(decode(rn,1,sortest_tesc_code)) tesc_code1,
           max(decode(rn,1,score)) score1,
           max(decode(rn,2,sortest_tesc_code)) tesc_code2,
           max(decode(rn,2,score)) score2,
           max(decode(rn,3,sortest_tesc_code)) tesc_code3,
           max(decode(rn,3,score))  score3,
           max(decode(rn,4,sortest_tesc_code)) tesc_code4,
           max(decode(rn,4,score))  score4,
           max(decode(rn,5,sortest_tesc_code)) tesc_code5,
           max(decode(rn,5,score))  score5,
           max(decode(rn,6,sortest_tesc_code)) tesc_code6,
           max(decode(rn,6,score))  score6        
      FROM (select sortest_pidm,
                   sortest_tesc_code,
                   score,
                  row_number() over (partition by sortest_pidm order by score desc) rn
              FROM (select sortest_pidm,
                           sortest_tesc_code,
                           max(sortest_test_score) score
                      from sortest,SPRIDEN
                      where
                      SPRIDEN_pidm =SORTEST_PIDM
                    AND   sortest_tesc_code in ('A01','BAE','A02','BAM','A05','BAC')
                     and  sortest_pidm is not null 
                    GROUP BY sortest_pidm, sortest_tesc_code))
                    GROUP BY sortest_pidm;
                   

    Hi,
    That depends on whether spriden_pidm is unique, and on what you want for results.
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevamnt columns only) for all tables, and the results you want from that data.
    If you can illustrate your problem using commonly available tables (such as those in the scott or hr schemas) then you don't have to post any sample data; just post the results you want.
    Either way, explain how you get those results from that data.
    Always say which version of Oracle you're using.
    It looks like you're doing something similiar to the following.
    Using the emp and dept tables in the scott schema, produce one row of output per department showing the highest salary in each job, for a given set of jobs:
    DEPTNO DNAME          LOC           JOB_1   SAL_1 JOB_2   SAL_2 JOB_3   SAL_3
        20 RESEARCH       DALLAS        ANALYST  3000 MANAGER  2975 CLERK    1100
        10 ACCOUNTING     NEW YORK      MANAGER  2450 CLERK    1300
        30 SALES          CHICAGO       MANAGER  2850 CLERK     950On each row, the jobs are listed in order by the highest salary.
    This seems to be analagous to what you're doing. The roles played by sortest_pidm, sortest_tesc_code and sortest_test_score in your sortest table are played by deptno, job and sal in the emp table. The roles played by spriden_pidm, id and name in your spriden table are played by deptno, dname and loc in the dept table.
    It sounds like you already have something like the query below, that produces the correct output, except that it does not include the dname and loc columns from the dept table.
    SELECT    deptno
    ,       MAX (DECODE (rn, 1, job))     AS job_1
    ,       MAX (DECODE (rn, 1, max_sal))     AS sal_1
    ,       MAX (DECODE (rn, 2, job))     AS job_2
    ,       MAX (DECODE (rn, 2, max_sal))     AS sal_2
    ,       MAX (DECODE (rn, 3, job))     AS job_3
    ,       MAX (DECODE (rn, 3, max_sal))     AS sal_3
    FROM       (
               SELECT    deptno
               ,          job
               ,          max_sal
               ,          ROW_NUMBER () OVER ( PARTITION BY  deptno
                                              ORDER BY          max_sal     DESC
                                )         AS rn
               FROM     (
                             SELECT    e.deptno
                       ,           e.job
                       ,           MAX (e.sal)     AS max_sal
                       FROM      scott.emp        e
                       ,           scott.dept   d
                       WHERE     e.deptno        = d.deptno
                       AND           e.job        IN ('ANALYST', 'CLERK', 'MANAGER')
                       GROUP BY  e.deptno
                       ,           e.job
    GROUP BY  deptno
    ;Since dept.deptno is unique, there will only be one dname and one loc for each deptno, so we can change the query by replacing "deptno" with "deptno, dname, loc" throughout the query (except in the join condition, of course):
    SELECT    deptno, dname, loc                    -- Changed
    ,       MAX (DECODE (rn, 1, job))     AS job_1
    ,       MAX (DECODE (rn, 1, max_sal))     AS sal_1
    ,       MAX (DECODE (rn, 2, job))     AS job_2
    ,       MAX (DECODE (rn, 2, max_sal))     AS sal_2
    ,       MAX (DECODE (rn, 3, job))     AS job_3
    ,       MAX (DECODE (rn, 3, max_sal))     AS sal_3
    FROM       (
               SELECT    deptno, dname, loc          -- Changed
               ,          job
               ,          max_sal
               ,          ROW_NUMBER () OVER ( PARTITION BY  deptno      -- , dname, loc     -- Changed
                                              ORDER BY          max_sal      DESC
                                )         AS rn
               FROM     (
                             SELECT    e.deptno, d.dname, d.loc                    -- Changed
                       ,           e.job
                       ,           MAX (e.sal)     AS max_sal
                       FROM      scott.emp        e
                       ,           scott.dept   d
                       WHERE     e.deptno        = d.deptno
                       AND           e.job        IN ('ANALYST', 'CLERK', 'MANAGER')
                       GROUP BY  e.deptno, d.dname, d.loc                    -- Changed
                       ,           e.job
    GROUP BY  deptno, dname, loc                    -- Changed
    ;Actually, you can keep using just deptno in the analytic PARTITION BY clause. It might be a little more efficient to just use deptno, like I did above, but it won't change the results if you use all 3, if there is only 1 danme and 1 loc per deptno.
    By the way, you don't need so many sub-queries. You're using the inner sub-query to compute the MAX, and the outer sub-query to compute rn. Analytic functions are computed after aggregate fucntions, so you can do both in the same sub-query like this:
    SELECT    deptno, dname, loc
    ,       MAX (DECODE (rn, 1, job))     AS job_1
    ,       MAX (DECODE (rn, 1, max_sal))     AS sal_1
    ,       MAX (DECODE (rn, 2, job))     AS job_2
    ,       MAX (DECODE (rn, 2, max_sal))     AS sal_2
    ,       MAX (DECODE (rn, 3, job))     AS job_3
    ,       MAX (DECODE (rn, 3, max_sal))     AS sal_3
    FROM       (
                   SELECT    e.deptno, d.dname, d.loc
              ,       e.job
              ,       MAX (e.sal)     AS max_sal
              ,       ROW_NUMBER () OVER ( PARTITION BY  e.deptno
                                           ORDER BY       MAX (sal)     DESC
                                          )       AS rn
              FROM      scott.emp    e
              ,       scott.dept   d
              WHERE     e.deptno        = d.deptno
              AND       e.job                IN ('ANALYST', 'CLERK', 'MANAGER')
                  GROUP BY  e.deptno, d.dname, d.loc
              ,       e.job
    GROUP BY  deptno, dname, loc
    ;This will work in Oracle 8.1 and up. In Oracle 11, however, it's better to use the SELECT ... PIVOT feature.

  • [10g] Need help with order by clause in hierarchical query

    I have the following sample data:
    CREATE TABLE     bill_test1
    (     parent_part     CHAR(25)
    ,     child_part     CHAR(25)
    ,     line_nbr     NUMBER(5)
    ,     qty_per          NUMBER(9,5)
    INSERT INTO bill_test1 VALUES ('ABC-1','ABC-10',100,1);
    INSERT INTO bill_test1 VALUES ('ABC-1','ABC-20',200,2);
    INSERT INTO bill_test1 VALUES ('ABC-1','ABC-30',300,3);
    INSERT INTO bill_test1 VALUES ('ABC-1','HARDWARE-1',401,10);
    INSERT INTO bill_test1 VALUES ('ABC-1','HARDWARE-2',402,5);
    INSERT INTO bill_test1 VALUES ('ABC-10','ABC-155',100,2);
    INSERT INTO bill_test1 VALUES ('ABC-10','HARDWARE-1',200,1);
    INSERT INTO bill_test1 VALUES ('ABC-155','RAW-2',100,4.8);
    INSERT INTO bill_test1 VALUES ('ABC-155','HARDWARE-3',200,3);
    INSERT INTO bill_test1 VALUES ('ABC-20','RAW-1',100,10.2);
    INSERT INTO bill_test1 VALUES ('ABC-30','RAW-3',100,3);And the query below gives me exactly what I want, in the order I want it. However, I am wondering if there is a way to get this order without creating the SEQ column, since I don't need it in my results
    SELECT     part_nbr
    ,     parent_part
    ,     child_part
    FROM     (
         SELECT     CONNECT_BY_ROOT b.parent_part                         AS part_nbr
         ,     b.parent_part
         ,     b.child_part
         ,     SYS_CONNECT_BY_PATH(b.line_nbr,' ')                    AS seq
         FROM     bill_test1 b
         ,     dual
         CONNECT BY     parent_part     = PRIOR child_part
    WHERE          part_nbr     = 'ABC-1'
    ORDER BY     seq
    Results of above query, except with SEQ included in SELECT (just to show what I'm sorting off of):
    PART_NBR                     PARENT_PART                  CHILD_PART                   SEQ
    ABC-1                        ABC-1                        ABC-10                        100
    ABC-1                        ABC-10                       ABC-155                       100 100
    ABC-1                        ABC-155                      RAW-2                         100 100 100
    ABC-1                        ABC-155                      HARDWARE-3                    100 100 200
    ABC-1                        ABC-10                       HARDWARE-1                    100 200
    ABC-1                        ABC-1                        ABC-20                        200
    ABC-1                        ABC-20                       RAW-1                         200 100
    ABC-1                        ABC-1                        ABC-30                        300
    ABC-1                        ABC-30                       RAW-3                         300 100
    ABC-1                        ABC-1                        HARDWARE-1                    401
    ABC-1                        ABC-1                        HARDWARE-2                    402

    Hi,
    As long as there's only one root, you can say ORDER SIBLINGS BY, but you can't do that in a sub-query (well, you can, but usually there's no point in doing it in a sub-query). If the CONNECT BY is being done in a sub-query, there is no guarantee that the main query will preserve the hierarchical order that the sub-query provides.
    The query you posted doesn't require a suib-query, so you can say:
    SELECT     CONNECT_BY_ROOT b.parent_part                         AS part_nbr
    ,     b.parent_part
    ,     b.child_part
    --,     SYS_CONNECT_BY_PATH(b.line_nbr,' ')                    AS seq
    FROM     bill_test1 b
    WHERE          CONNECT_BY_ROOT b.parent_part     = 'ABC-1'
    CONNECT BY     parent_part     = PRIOR child_part
    ORDER SIBLINGS BY     b.line_nbr     
    ;I said the query you posted doesn't require a sub-query. It also doesn't require dual, so I suspect what you posted is a simplification of what you're really doing, and that may need a sub-query. In particular, if you intend to GROUP BY part_nbr, then you need the sub-query. We can repeat the CONNECT_BY_ROOT expression in the WHERE clause (or, now that I think about it, use a START WITH clause instead of WHERE), but, for some reason, we can't use CONNECT_BY_ROOT in a GROUP BY clause; we need to compute CONNECT_BY_ROOT in a sub-query, give it a name (like part_nbr), and GROUP BY that column in a super-query.
    This assumes that there is only one root node. ORDER SIBLINGS BY means just that: children of a common parent will appear in order, but the root nodes, who have no parents, will not necessarily be in order.
    Here's what I meant by using START WITH instead of WHERE:
    SELECT     CONNECT_BY_ROOT b.parent_part                         AS part_nbr
    ,     b.parent_part
    ,     b.child_part
    --,     SYS_CONNECT_BY_PATH(b.line_nbr,' ')                    AS seq
    FROM     bill_test1 b
    START WITH     b.parent_part     = 'ABC-1'
    CONNECT BY     parent_part     = PRIOR child_part
    ORDER SIBLINGS BY     b.line_nbr     
    ;This should be much more efficient, because it narrows down the results before you waste time getting their descendants.
    Using a START WITH clause here is analagous to me sending you an e-mail, saying "Come to a meeting a my office at 3:00."
    Using a WHERE clause here is analagous to me sending an e-mail to everyone in the company, saying "Come to a meeting a my office at 3:00", and then, as people get here, telling everyone except you that they can go back.
    ORDER SIBLINGS BY was introduced in Oracle 9.
    Edited by: Frank Kulash on Dec 9, 2010 2:39 PM
    Added version with START WITH clause

  • Summary PO Report Query

    Hello All --
    We currently have this Query below that shows Open PO's in detail.  We would like a summary form of this -- so instead of showing every single item being received in the PO, it just shows total qty and the style #. 
    Out item code is 9 digits -- first 4 digits are Style #, next 2 digits are color and last 3 digits are size.  In most cases, each PO only has one Style # but multiple colors and sizes. We want a PO summary report that does not show colors and sizes.  We just want to show the Style # (first 4 digits) and the total amount ordered in that PO. 
    So, would show similar to current Query except summarized:
    PO #...Style # (first 4 digits of Item #)...Total Order Qty...Order Date...Exp Rec Date
    Select t1.docnum as PO#,t0.itemcode as Item#, t0.Dscription as
    'Item Desc',t0.quantity as 'Ord Qty', (t0.quantity - t0.OpenQty) as
    'Rec Qty', t0.OpenQty as 'Rem Qty', t1.taxdate as 'Order Date',
    t1.DocDueDate as 'Exp Receipt Date'
    from por1 t0
    inner join opor t1 on t1.docentry = t0.docentry
    where t1.DocType = 'I' and t1.docstatus = 'O'
    order by t1.docnum
    Help?!
    Thanks,
    Mike

    You can try this, however you have to learn how to write query instead of always asking others for help:
    Select t1.docnum as PO#, Substring(t0.itemcode, 1, 4) as Style#, Sum(t0.quantity) as 'Total Order Qty', t1.taxdate as 'Order Date', t1.DocDueDate as 'Exp Receipt Date'
    From dbo.por1 t0
    Inner join dbo.opor t1 on t1.docentry = t0.docentry
    Where t1.DocType = 'I' and t1.docstatus = 'O'
    Group By t1.docnum, Substring(t0.itemcode, 1, 4), t1.taxdate, t1.DocDueDate
    Order By t1.docnum
    Thanks,
    Gordon

Maybe you are looking for