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

Re: Problem: how to uniquely join records in JDT1 and VPM4 tables

$
0
0

Hi Kennedy,

 

The snippet :

--------

Select * from JDT1 T1

Inner Join OVPM T2 on T2.TransId=t1.TransId

Inner Join VPM4 T3 on T3.DocNum=t2.DocEntry and t3.AcctCode=t1.Account

Where t1.TransId = 51728

and T1.VatGroup = T3.VatGroup

----------

 

can not be used as accounts in these two tables are diffrerent as per my example in the original post.

 

Also, snippet:

 

SELECT T0.DocNum, T0.Series, T0.DocDate, T0.PayToCode, T0.Comments, T1.AcctName, T1.Descrip, T1.SumApplied 
FROM OVPM T0 

INNER JOIN VPM4 T1 ON T0.DocNum = T1.DocNum

inner join JDT1 T2 on T2.TransId=T0 .TransId

where
     T0.DocNum =[%0]

 

--

Transact SQL does not recognise below:

=[%0]

 

what is actualy [%0] 

 

Thanks.

 

Regards,

 

Davor


Viewing all articles
Browse latest Browse all 11577

Trending Articles



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