Results on query with filter, but zero results when filter removed

I have been handed the below query and I may be missing something blindingly obvious here but if i run it i get no results
SELECT lipqoh
FROM f41021 a , f0006 b
          WHERE      b.mcmcu = a.limcu AND
               b.mcstyl = 'W';
if i add the filter a.liitm = 105900 like below data is returned (although the entries are 0 as expected at the moment, this is not always the case)
SELECT lipqoh
FROM f41021 a , f0006 b
          WHERE      b.mcmcu = a.limcu AND
               b.mcstyl = 'W'
a.liitm = 105900;
the fields for each of the tables mentioned in the query have the following characteristics
lipqoh Number NULLABLE
mcmcu Char(12 BYTE) NOT NULLABLE
mcstyl Char(2 BYTE) NULLABLE
liitm Number NOT NULLABLE
Any guidance would be greatly appreciated

here is a small sample of the output from the query you provided, the explain plan for the query without additional filter does not mention an index just Partition List Table Access F41021 Full
LIPQOH MC
DUMP(B.MCSTYL)
DUMP('W')
MCMCU
DUMP(B.MCMCU)
DUMP(A.LIMCU)
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
CSW
Typ=96 Len=12: 32,32,32,32,32,32,32,32,32,67,83,87
Typ=96 Len=12: 32,32,32,32,32,32,32,32,32,67,83,87
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
CSW
Typ=96 Len=12: 32,32,32,32,32,32,32,32,32,67,83,87
Typ=96 Len=12: 32,32,32,32,32,32,32,32,32,67,83,87
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL01
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,49
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,49
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL01
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,49
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,49
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL02
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,50
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,50
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL05
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,53
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,53
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL06
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,54
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,54
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL08
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,56
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,56
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL08
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,56
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,48,56
0 W
Typ=96 Len=2: 87,32
Typ=96 Len=1: 87
SOL22
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,50,50
Typ=96 Len=12: 32,32,32,32,32,32,32,83,79,76,50,50

Similar Messages

  • How to create a Pooled VDI infrastructure using Win server 2012 as VM image?I have followed the "usual" way to build a pooled VDI desktop using Win7 or Win8 with success, but it fails when I use an image of Win Server 2012 as VM

    I have followed the "usual" way to build a pooled VDI desktop using Win7 or Win8 with success, but it fails when I use an image of Win Server 2012 as VM instead.
    Am I overlooking something?  Should I need to prepare the image in a different way? (Sysprep differently?)
    Thanks

    Hi,
    Thank you for your posting in Windows Server Forum.
    Can you specify the error which you are facing during VDI setup for server 2012?
    I might think that you need to check the memory setting for server 2012, as might happens that due to less memory you can’t setup the VDI setup properly. 
    Memory: If the Master VM is configured with static memory, it must have at least 1024 MB as startup RAM. If the Master VM is configured with dynamic memory, the maximum RAM must be at least 1024 MB.
    Please check beneath article for information.
    Windows
    Server 2012 2,500-user pooled VDI deployment guide (Doc)
    Single Image Management for Virtual Desktop Collections in Windows Server 2012
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Query with a condition - Overall results row displays incorrect value

    Hi All,
    I have a bw query with top 40 conditions. However, The Overall Result Row Figures Do Not Equal The Sum of the Column Rows.
    Although the top condition is activated, the overall result still displays the overall result of the whole report.
    I have 3 columns in the report
    Selected Period
    Prior Period and
    Variance
    The formula for variance is (Selected Period/Prior Period)-1.
    Does anyone have an idea to fix this?
    Thank you so much in advance.
    Have a great day!

    Hi Gaurav,
    Thank you so much for your reply, however this does not solve fully the issue.
    Changing the properties to "Summation" will indeed provide me with the correct sum for the "selected period" and "Prior Period." However what I need in the Overall Result Row for the "Variance" column is not the total but instead the value when the total of Selected Period is divided by Prior Period then minus 1.
    Overall Variance = (Overall Selected Period/Overall Prior Period)-1
    Do you know a way to make this possible.
    Thank you so much.

  • Query with Top N Condition (Result Row)

    Hi,
    I made a query with an active top n condition. The query has 2 Keyfigures and 1 formula
    Gross-sales acutal | Gross-sales previous year | Previous Year %
    So that to result line is correct, I had to say "Calculate result as summation" for the keyfigures
    gross sales actual and gross sales previous year. That works.
    I have the problem with my formula. the formular for previous year % is defined as follows:
    gross sales actual %A gross sales previous year
    Example Top 3 Customer
                        gross sales actual          gross sales prev. year         prev. year %
    Cust 1          100                                   80                                       125 %
    Cust 2          90                                     45                                        200 %
    Cust 3           80                                    60                                        133 %
    Result          270                                   185                                       142.8 % ( 350 * 100 / 245 )
    The result of 142 % is the correct result without the condition top 3. with the top 3 condition
    the result should be 270 * 100 / 185 = 145.9 %
    Additional customer without top 3 condition
    Cust 4          50                                       40                                        125 %
    Cust 5          30                                        20                                        150 %
    It shows the correct result for each single line. The result in the result row is wrong. it is calculated
    without taking the active condition. the formular calculates
    with the total gross sales actual and the total of gross sales prev. year.
    is there any solution the achieve the correct % in the result row?
    thanks for your help.
    Pascal

    Pascal,this is a known behavior with conditions.When you apply condition it just hide the extra rows and it does not impact the result row.So your result row actually shows the value irrespective of the condition you apply.
    Now with the help of local functions like calculate result as summation you can show the correct sum after applying the condition but when you try to use that result in some calculation then it takes the original value thereby discarding the calculated value.
    Same is happening in your case as well.Its taking the original value i.e 350 and not the calculated sum after condition i.e 270.
    Hope this helps.
    Regards,
    AL

  • Simple query with like return wrong result

    Hi,
    I run simple query with like.
    If I use parameter I get wrong results.
    If I use query without parameter results are ok.
    My script:
    ALTER SESSION SET NLS_SORT=BINARY_CI;
    ALTER SESSION SET NLS_COMP=LINGUISTIC;
    -- drop table abcd;
    create table abcd (col1 varchar2(10));
    INSERT INTO ABCD VALUES ('122222');
    insert into abcd values ('111222');
    SELECT * FROM ABCD WHERE COL1 LIKE :1; -- wrong result with value 12%
    COL1
    122222
    *111222*
    select * from abcd where col1 like '12%'; -- result ok
    COL1
    122222
    I use Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    and query run in Oracle SQL Developer 3.1.07.

    Hi,
    welcome to the forum.
    When you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    You should specify exactly how you run your code.
    If I run this statement in SQL Plus:SQL> ALTER SESSION SET NLS_SORT=BINARY_CI;
    Session altered.
    SQL> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    Session altered.
    SQL>
    SQL> -- drop table abcd;
    SQL> create table abcd (col1 varchar2(10));
    Table created.
    SQL>
    SQL> INSERT INTO ABCD VALUES ('122222');
    1 row created.
    SQL> insert into abcd values ('111222');
    1 row created.
    SQL>
    SQL> SELECT * FROM ABCD WHERE COL1 LIKE :1;
    SP2-0552: Bind variable "1" not declared.
    SQL>
    I got this error. So I wonder how you set value 12%
    Please specify exactly how you run your test as we cannot reproduce your problem.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Wrong result for query with like and %

    I have a strange problem with query with like and %.
    When I run this script:
    ALTER SESSION SET NLS_SORT = 'BINARY_CI';
    ALTER SESSION SET NLS_COMP = 'LINGUISTIC';
    -- SELECT * FROM NLS_SESSION_PARAMETERS;
    -- drop table test1;
    CREATE TABLE TEST1(K1 NVARCHAR2(80));
    INSERT INTO TEST1 VALUES ('gsdk');
    INSERT INTO TEST1 VALUES ('ąxyz');
    INSERT INTO TEST1 VALUES ('ŁFa');
    INSERT INTO TEST1 VALUES ('ła');
    INSERT INTO TEST1 VALUES ('Śab');
    INSERT INTO TEST1 VALUES ('Śrrrb');
    commit;
    select * from TEST1 where k1 like N'Ł%';
    I get this:
    K1
    ŁFa
    ła
    Śab <- WRONG
    Śrrrb <- WRONG
    4 rows selected
    When i change datatype to varchar2 this code work correct.
    Is this a bug or what ?
    The execution plan:
    PLAN_TABLE_OUTPUT
    SQL_ID d3d64aupz4bb5, child number 2
    select * from TEST1 where k1 like N'Ł%'
    Plan hash value: 4122059633
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 2 (100)| |
    |* 1 | TABLE ACCESS FULL| TEST1 | 1 | 82 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter((NLSSORT("K1",'nls_sort=''BINARY_CI''')>=HEXTORAW('014200'
    ) AND NLSSORT("K1",'nls_sort=''BINARY_CI''')<HEXTORAW('01610100') ))
    Note
    - dynamic sampling used for this statement (level=2)

    DATABASE NLS CONFIGURATION:
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_COMP     BINARY
    NLS_SORT     BINARY
    Oracle version 11.2.0.2.0

  • Query with filters, but Web Appl Designer jumps the previous screen

    Hi all!
    I have a query with a variable selection data screen, all fields are not required.   When I execute the query with query designer the query run Ok.   I designed a web application with this query.   When I execute the query with Web Application Designer the tool jumps the selection data screen and shows the report directly.   Do I have to activate something in Web Aplication Designer tool?
    Thanks in advance!
    Ada.

    Hi,
    In WAD, open your web template.
    Click on anywhere in the template other than on web items (White screen) --> Goto Web item properties of template (present in left pane of WAD) --> Force Variable Screen (Check this option).
    Now Save and execute your query. You will get the variable screen displayed.
    Regards,
    KK.

  • SQL query with parameter returns empty result set, please help !!!

    Hi there,
    When I use the following query :
    <sql:query var="beroepsthemas" >
    select *
    from beroepsthemas
    where beroepsthemaid = ?
    <sql:param value="12"/>
    </sql:query>
    When I want to browse the result set with :
    <c:forEach items="${beroepsthemas.rows}" var="rij">
    it shows no records. But it must return at least one.
    All my jsp pages with sql queries and parameters have the same problem.
    This is all on my test environment. I'm using Ubuntu 5.10, Netbeans5.0, JDK 1.5_06, application runs in Bundeled Tomcat 5.5.9, MySQL 4.1.12, mysql-connector3.1.6
    When the same code is run on the live environment, it works just fine.
    The difference is :
    Mysql 4.1.10a, tomcat5.5.9, mysql-connector3.1.6
    What can there be wrong !!

    When the same code is run on the live environment, it
    works just fine.
    The difference is :
    Mysql 4.1.10a, tomcat5.5.9, mysql-connector3.1.6
    I didn't catch this. I think you may need to update the database driver.

  • Query with a condition - Overall results row is wrong

    Hello,
    I have a query that uses a condition.  The query gives me the top 10 brands according to the Net Sales.  The query itself runs fine.  I just noticed however that the Overall Result row isn't giving me the correct number.
    For example:
    <b>BRAND            NETSALES    MARGIN %</b>
    Brand1           $100        25%
    Brand2           $60         10%
    Brand3           $20         15%
    <b>OVERALL RESULT   $210        2%</b>
    As you can see it does not add up or average correctly.  This query has no macros or anything, it only uses a condition.
    Any suggestions?
    Thanks,
    Nick

    A workaround I have found is the manual directions in this OSS note: 572910
    Anyone have any follow up?
    Thanks.
    Nick

  • How to hold result of query with too many characters into a cursor?

    Hi, guys:
    Could anyone help me on this issue? I encounter such a error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small. The reason is because the returning result is too big to hold in a cursor. I know I should use clob, how can I return result of a query into a clob?
    Here is my code of procedure
    function Find_Near_Offenders(P_f_Resident_Latitude in float, P_f_Resident_Longitude in float, P_n_Radius in number, P_s_User_Group in varchar2, P_b_Found out boolean) return rcur_Offender AS
        rcur_Offender_address rcur_Offender;
      begin
        if P_s_User_Group='Public' then
            open rcur_Offender_address for
              select distinct  so.offender_id as "Offender_ID",  so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender_Name",
              replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#') ,',') as "Address",
              replace(replace(nvl2(sl.physical_address1,sl.physical_address1||' '||sl.physical_city ||' '||sl.physical_county||' '||(select sc4.description from sor_code sc4 where sc4.code_id=sl.physical_state)||' '||sl.physical_zip, 'No Known Address'),'#') ,',')  as "Physical_Address",
              nvl2(sl.ADDRESS_LATITUDE, to_char(sl.ADDRESS_LATITUDE)||','||to_char(sl.address_longitude),'') as "Address_Geocoding",
              nvl2(sl.physical_address_latitude,to_char(sl.physical_address_latitude) ||','||to_char(sl.physical_address_Longitude),'') as "Physical_Geocoding"
              from sor_location sl, sor_offender so, sor_offense sof, registration_offender_xref rox, sor_last_locn_v sllv
              where rox.offender_id=so.offender_id
              and sllv.offender_id(+)=so.offender_id
              and sl.location_id(+)=sllv.location_id
              and sof.offender_id=so.offender_id
              and rox.status not in ('Merged')
              and rox.reg_type_id=1
              and upper(rox.status)='ACTIVE'
              and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
              --and sl.physical_address_latitude is null
              and sl.ADDRESS_LATITUDE <=to_number(P_f_Resident_Latitude)+0.02*to_number(P_n_Radius) and sl.ADDRESS_LATITUDE>= to_number(P_f_Resident_Latitude)-0.02*to_number(P_n_Radius)
              and sl.address_longitude >=to_number(P_f_Resident_Longitude)-0.02*to_number(P_n_Radius) and  sl.address_longitude<=to_number(P_f_Resident_Longitude)+0.02*to_number(P_n_Radius)
              and sor_google_map_service.Calculate_Distance(P_f_Resident_Latitude, P_f_Resident_Longitude, sl.ADDRESS_LATITUDE, sl.address_longitude)<=P_n_Radius
              union
              select distinct  so.offender_id as "Offender_ID",  so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender_Name",
              replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#') ,',') as "Address",
              replace(replace(nvl2(sl.physical_address1,sl.physical_address1||' '||sl.physical_city ||' '||sl.physical_county||' '||(select sc4.description from sor_code sc4 where sc4.code_id=sl.physical_state)||' '||sl.physical_zip, 'No Known Address'),'#') ,',')  as "Physical_Address",
              nvl2(sl.ADDRESS_LATITUDE, to_char(sl.ADDRESS_LATITUDE)||','||to_char(sl.address_longitude),'') as "Address_Geocoding",
              nvl2(sl.physical_address_latitude,to_char(sl.physical_address_latitude) ||','||to_char(sl.physical_address_Longitude),'') as "Physical_Geocoding"
              from sor_location sl, sor_offender so, sor_offense sof, registration_offender_xref rox, sor_last_locn_v sllv
              where rox.offender_id=so.offender_id
              and sllv.offender_id(+)=so.offender_id
              and sl.location_id(+)=sllv.location_id
              and sof.offender_id=so.offender_id
              and rox.status not in ('Merged')
              and rox.reg_type_id=1
              and upper(rox.status)='ACTIVE'
              and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
              and sl.physical_address_latitude <=to_number(P_f_Resident_Latitude)+0.02*to_number(P_n_Radius) and sl.physical_address_latitude>= to_number(P_f_Resident_Latitude)-0.02*to_number(P_n_Radius)
              and sl.physical_address_Longitude >=to_number(P_f_Resident_Longitude)-0.02*to_number(P_n_Radius) and  sl.physical_address_Longitude<=to_number(P_f_Resident_Longitude)+0.02*to_number(P_n_Radius)
              and sor_google_map_service.Calculate_Distance(P_f_Resident_Latitude, P_f_Resident_Longitude, sl.physical_address_latitude, sl.physical_address_Longitude)<=P_n_Radius;
            return rcur_Offender_address;
          end if;
      end;and my anonymous block is:
    declare
      query_result json_list;
      --list_string varchar2(32000);
      list_string clob;
      l_cursor sor_google_map_service.rcur_Offender;
      b_found boolean;
    begin
        l_cursor:=sor_google_map_service.find_near_offenders(35.5113030,-97.5543081, 3, 'Public', b_found);
        query_result:=json_util_pkg.ref_cursor_to_json(l_cursor);
        list_string:='{"Offenders": '||json_printer.pretty_print_list(query_result)||'}';
        dbms_output.put_line(list_string);
    end;

    lxiscas wrote:
    I checked the PL_JSON, and I found it uses sys_refcursor, which is limited to 32K around. That doesn't make sense. A SYS_REFCURSOR has no 32k limit-- the limits are related to the data types that the SQL statement that the SYS_REFCURSOR points to uses. If that SQL statement has a CLOB column, there is effectively no limit. If that SQL statement has a VARCHAR2 column, you've got the 4000 byte limit.
    and I was using varchar2 variable in anonymous block. However, my cursor result is too big to hold in a 32K space. Again, this doesn't seem to make sense. There is no such thing as a result that is too big for a cursor
    Do you think I need to change PL_JSON API myself to ensure it uses CLOB? or there is anyway that I can avoid update PL_JSON package internally?If the PL_JSON package is trying to write more than 32k of data into a VARCHAR2, your options are
    - Modify the package to use a CLOB
    - Find some other package that implements whatever functionality you need
    - Limit the data to 32k
    Justin

  • Query with Consecutive Dates in results

    I have a table like this:
    queue data_date volume
    2324 09-01-01 353
    2324 09-01-03 34
    2324 09-01-04 43
    2325 09-01-01 53
    2325 09-01-02 66
    i want to have output like this:
    queue data_date volume
    2324 09-01-01 353
    *2324 09-01-02 0*
    2324 09-01-03 34
    2324 09-01-04 43
    2325 09-01-01 53
    2325 09-01-02 66
    Note the filled in 09-01-02 date.
    What I'm doing now is using a pipelined table function that iteratates through the date range executing a select for each date and doing a piped output. A bit slow but faster than old solution below.
    I've also did set operations using a single query that contains unions and minuses. This proved to be slow.
    The only thing I haven't tried is to have a stored proc popuate the 0 for the missing date.
    Is there another way to do this that's efficient?
    I'm using a 10g database but soon the data will be ported to an 11g.

    Welcome to the forums!
    I would say one of the best ways on most recent versions of Oracle would be to use the PARTITION OUTER JOIN.
    See the following link for examples/explanation: partition outer join in oracle 10g

  • Results in Query Builder Differ From Report Results

    I've got a report I built in SSRS using an SSAS dataset. The problem is that the results differ between the query builder result set and the actual report. For some reason, when running the actual report, certain rows are being filtered out, but yet those
    same rows appear in the result set when validating the query in the query builder.
    Here's the result set as it appears in query builder:
    ...and here are the results of the actual report:
    As you can see, 3M and Angie's popcorn are not returned in the report. I have no filters defined on the report at all.
    This appears to be happening with other result sets for the same report.
    No idea why the results are accurate in query builder and then off in the actual report.
    Any help would be appreciated!
    A. M. Robinson

    Hi A. M. Robinson,
    The issue may be caused by the data cache. When we preview a report, the report processor runs all the queries for datasets in the report using the current parameter defaults, and saves the results as a local data cache (.rdl.data) file. We can continue
    to design our report without incurring the overhead of retrieving this data again if we make no changes to either the report dataset queries or the report parameters. Please to delete the cache (.rdl.data) file try to solve the issue.
    Reference: http://technet.microsoft.com/en-us/library/ms157366.aspx
    Alternative, you can create a similar report to check if the issue is persist.
    If the issue is persist, could you please post more detail information about your report design?  It is benefit for us to do further analysis.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Overall result in Query designer displaying ' * ' for one kf when executing

    Hello
    I have a got a kf in which value ' * ' is getting displayed when i have done display overall results for one of my chars. Now what i am hoping is that this can be because there are too many records in the display and the total is too huge and that is the reason it is disaplying * in it. Please can somone guide me if there is some setting that can be done

    Hi Tom,
    This is because you have different unit or currency in the data record and you can not sum it if they are different unit/Currency therefore system is showing you *.
    You can try NODIM(KF) and see if it is adding or try currency or unit conversion at query level so that all records in the query have same unit/currency.
    Regards,
    Kams

  • Batch Query with Batch but need address lines split by column

    Hi folks,
    I have the following query I created with the batch number of the sales order:
    SELECT T0.[DocDate] as "Date", T1.[DocNum] as "Sales Order Number",  T0.[CardCode] as "Customer Code", T0.[CardName] as "Customer Name",T1.[Address2], T0.[ItemCode],  T0.[ItemName], T0.[BatchNum], T0.[Quantity], T1.pickrmrk FROM IBT1 T0, ORDR T1 WHERE T0.[BaseNum] = T1.[DocNum] and T1.docstatus = 'O' and T0.WHSCODE = '01' order by T0.BaseNum
    Now I need to split the address by column so need street, block, city, county, country and zipcode fields from CRD1, but would either need the ship to address of the sales order it is selected or even just the default ship to address of the sales order.  In above query T1.[Adress2] is not quite right for our needs, as this file will have to be exported to 3rd party.  So I have gotten this far:
    SELECT T0.[DocDate] as "Date", T1.[DocNum] as "Sales Order Number",  T0.[CardCode] as "Customer Code", T0.[CardName] as "Customer Name",T1.[Address2], T2.[Street], T2.[Street], T2.[Block], T2.[City], T2.[County], T2.[Country], T2.[Zipcode], T0.[ItemCode],  T0.[ItemName], T0.[BatchNum], T0.[Quantity], T1.pickrmrk FROM IBT1 T0, ORDR T1, CRD1 T2 WHERE T0.[BaseNum] = T1.[DocNum] and T1.docstatus = 'O' and T0.WHSCODE = '01' and T0.[CardCode] = T2.[CardCode] and T2.[AdresType] = 'S' order by T0.BaseNum
    but will split into multiples if a business partner have more than one shipping address.
    Can someone please advise on this one?
    Many thanks in advance,

    Thanks Agustin, tried it with RDR12 as the following query:
    SELECT T0.[DocDate] as "Date", T1.[DocNum] as "Sales Order Number",  T0.[CardCode] as "Customer Code", T0.[CardName] as "Customer Name",T1.[Address2], T2.[StreetS], T2.[BlockS], T2.[CityS], T2.[ZipCodeS], T2.[CountyS], T2.[CountryS], T2.[ZipCodeS], T0.[ItemCode],  T0.[ItemName], T0.[BatchNum], T0.[Quantity], T1.pickrmrk FROM IBT1 T0, ORDR T1, RDR12 T2 WHERE T0.[BaseNum] = T1.[DocNum] and T1.docstatus = 'O' and T0.WHSCODE = '01' order by T0.BaseNum
    but has multiple lines for different addresses (and not just shipping addresses of that businss partner sales order).
    Anymore ideas or can you spot error in the query?
    Thanks again,

  • PO item received with qty but zero value

    Hi,
    I'm having a PO
    without material number,
    a/c assignment - M  
    Item has been received with qty and respectively value but when it returned (mov - 122) then only qty is appearing in PO history, No values.
    Is there is any specific reason?
    regards,

    Hello,
    Please note the description from the Overview for this SCN Space:
    Official SAP Help Portal Community. Find comments on SAP product documentation (such as SAP Application Help, also known as SAP Library), and read best practices shared by the community.
    Based on the above, I believe you posted your query into the incorrect SCN Space. Please use the Forum Finder for the New SCN document to find your product and post into that SCN Space.
    With best regards,
    Dominik
    SCN Moderator

Maybe you are looking for

  • Installation of SAP SolMan 4.0 SR2 on AIX 5.3/Oracle

    We have already installed SolMan 4.0 successfully in our dev sys--so we know this can be done. Now we are trying to start the sapinst to install our prod system and can't get the SAPInstGUI to recognize the sapinst running on the same server. We have

  • Copy paste problems - bootcamp

    The copy and paste functions don't seem to be working in dreamweaver 8 in bootcamp ... does anyone have a solution to this? I have tried deleting this file "WinFileCache-7A9586CB" as discussed in another thread ... but this made no difference. thanks

  • Application Module's "query-on-commit"  flag

    Hi All, Can you please guide how to set Application Module's "query-on-commit" flag as on/off.

  • Trouble charging battery with iTunes 7

    Hi, I upgraded a few weeks ago and have had nothing but trouble since. I solved part of the problem (thanks to info I found here) involving error messages and a crashing computer by removing Quick Time and 'fixing' iTunes. Now when I plug in my iPod

  • Credit management not updated for the first credit blocked order only

    Hi experts, Pls help to solve. Thx. Case: The first sales order is created against credit block because the credit limit is exceeded. In FD33, no credit data related to the first order indicates, i.e. credit limit used shows zero as well as sales val