Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3353

Re: convert Rows as Column

$
0
0

Hi Deepak,

 

For what I understand on your concern is you want to have a query that shows no repetitive rows. The cause could be that 1 line items could have 2 or more related data in which it causes repetitive results.

 

In that case, you may need to do the ff based from your query:

1. using JOIN functions

2. using DISTINCT or MAX functions

3. using subqueries (nested queries)

 

So for example if I am to revise your query, it would be this instead:

 

Select T0.NumAtCard,T0.DOCNUM AS

'ExInvoiceNo',CONVERT(VARCHAR(11), t0.docdate, 101) AS Posting_date,T12.FormNo,T0.U_VHCLNo,

T0.DOCTOTAL,T1.SubCatnum AS 'PartNo.',T1.Quantity

from OINV T0

INNER JOIN INV1 T1 on T0.Docentry=T1.Docentry

INNER JOIN INV12 on T0.DocEntry=T12.DocEntry

where T0.DOCNUM >=[%0] and t0.docnum <= [%1]

 

Pls. let me know if that's what you wanted, or correct me if I am wrong as well. Thanks!


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>