Results 1 to 5 of 5

Thread: SQL Query

  1. #1
    Join Date
    Sep 2014
    Posts
    7

    Unanswered: SQL Query

    Hi,

    i want to fecth the data as below. I am using an ERP.

    Example:

    In my Sales Order No i had entered 3 lines which are going to dispatch.

    Item A
    Item B
    Item C

    my table of sales Order line is tdsls041
    My table of item master is tiitm001
    My table of bill of material is tibom010

    Now my requirement is to select the records for all sales order with item A along with its child
    item in BOM.

    Example for making a ITEM A in my factory i require Item A1,A2,A3

    Now when i write the sql query i should get the Main Item ie A along with A1,A2,A3

  2. #2
    Join Date
    Sep 2014
    Posts
    7

    SQL Help

    Hi,

    i want to fecth the data as below. I am using an ERP.

    Example:

    In my Sales Order No i had entered 3 lines which are going to dispatch.

    Item A
    Item B
    Item C

    my table of sales Order line is tdsls041
    My table of item master is tiitm001
    My table of bill of material is tibom010

    Now my requirement is to select the records for all sales order with item A along with its child
    item in BOM.

    Example for making a ITEM A in my factory i require Item A1,A2,A3

    Now when i write the sql query i should get the Main Item ie A along with A1,A2,A3

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so do a join/joins on the table/s, following the parts explosion
    ...as you haven't provided the table definitions its impossible to help further in my books.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Sep 2014
    Posts
    7

    Help

    Hi,

    i want to fecth the data as below. I am using an ERP.

    Example:

    In my Sales Order No i had entered 3 lines which are going to dispatch.

    Item A
    Item B
    Item C

    my table of sales Order line is tdsls041
    My table of item master is tiitm001
    My table of bill of material is tibom010

    Now my requirement is to select the records for all sales order with item A along with its child
    item in BOM.

    Example for making a ITEM A in my factory i require Item A1,A2,A3

    Now when i write the sql query i should get the Main Item ie A along with A1,A2,A3

  5. #5
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    rohankumar09,

    what do you want to say?

    You wrote many unrelated words(or sample data?) each others, like...
    Item A
    Item B
    Item C
    or
    my table of sales Order line is tdsls041
    My table of item master is tiitm001
    My table of bill of material is tibom010
    or
    Main Item ie A along with A1,A2,A3
    Those were not referenced in other context(appeared only once in your descriptions).



    Anyway,

    I (who don't share the underlying applications)
    couldn't understand the tables and the columns, the data, and the relationships of them, the expected results, from your descriptions.


    I want to recommend you to publish those ...
    (1) DDLs (CREATE TABLE statemens and so on...)
    (2) INSERT statements to populate the tables.
    (3) Your expected results from (1) and (2)

    They must help communications of each others,
    and (for you) to get usefull responses from (this and other) forums.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •