Skip to Content
author's profile photo Former Member
Former Member

row text 1

Hi All,

I want to import sales order where there are some rowtext in the sales order, I use this query:

SELECT T2.[DocEntry], T2.[LineSeq], T2.[AftLineNum], T2.[LineText], T0.[ItemCode], T0.[Dscription], T0.[Quantity] FROM [dbo].[PDN1]  T0 left join [dbo].[PDN10]  T2 on t2.ordernum = t0.linenum INNER JOIN OPDN T3 ON T0.DocEntry = T3.DocEntry WHERE T3.[DocNum]  = '99'

The result:

# Document Key Row Sequence After Row Number Row Text Item No. Item/Service Description Quantity

1 A1006 Football Worldcup 2

2 99 Bonus A1007 Golf Balls 1

I could not find out how to separate the row text from the 2nd item. Actually the row text is above the linenum 2 or between item A1006 and item A1007. Please give advice. TIA

Rajh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 05:56 AM

    Do you mean to say you have a second row in your Goods Receipt of type Text and it has text in them

    How do you want the output. Please also mark the col head for the data

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Tks a lot for your answer.

      you are correct. The detail row of the PO or SO I want will be as follows:

      Document Key Row Sequence After Row Number Row Text Item No. Item/Service Description Quantity

      1 A1006 Football Worldcup 2

      99 Bonus

      2. A1007 Golf Balls 1

      is it possible using a query to retrieve the above result ? Pls give advice. TIA

      RAjh

      Edited by: rajh khumar on Apr 11, 2008 2:18 AM

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 01:11 AM

    I think we would need to write 2 queries and then sort them using DocEntry, LineNum

    Check the following query, I have just shown 2 columns, you may add more columns as per your need

    SELECT T0.DocEntry AS 'Document Key', T0.LineNum AS 'Row Number' FROM [dbo\].[PDN1\] T0

    UNION ALL

    SELECT T0.DocEntry AS 'Document Key', T0.AftLineNum+0.5 AS 'Row Number' FROM [dbo\].[PDN10\] T0

    ORDER BY DocEntry, [Row Number\]

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.