on 10-01-2014 10:01 AM
Dear Experts,
I want BP Master Data of Supplier and Customer form given date with address.
for that i make below query for supplier i.e CardType='S'
SELECT Distinct T0.[CardCode], T0.[CardName],T2.Address,T2.Street,T2.Block,T2.City,T2.ZipCode,T2.County
FROM OCRD T0 left join JDT1 T1 on T1.[ShortName] = T0.cardcode inner join CRD1 T2 on T0.CardCode = T2.CardCode
WHERE T0.[CardType] = 'S' and T1.[RefDate] >= [%0]
But This query is not working for Customer.
Can anybody help me to understand this?
Thanks,
Santosh.
Hi,
Try this query:
SELECT T0.[CardCode], T0.[CardName], T1.[Address], T1.[Street], T1.[Block], T1.[ZipCode], T1.[City], T1.[County] FROM OCRD T0 INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode WHERE T0.[CardType] = [%0] and T0.[CreateDate] between [%1] and [%2]
If does not meet your requirement, please explain your requirement. Why did you link OCRD with JDT1 table?
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this query:
SELECT Distinct T0.[CardCode], T0.[CardName],T2.Address,T2.Street,T2.Block,T2.City,T2.ZipCode,T2.County
FROM OCRD T0 left join JDT1 T1 on T1.[ShortName] = T0.cardcode inner join CRD1 T2 on T0.CardCode = T2.CardCode
WHERE T0.[CardType] = 'c' and T1.[RefDate] between [%0] and [%1]
Thanks & Regards,
Nagarajan
Hi,
Try this:
SELECT Distinct T0.[CardCode], T0.[CardName],T2.Address,T2.Street,T2.Block,T2.City,T2.ZipCode,T2.County
FROM OCRD T0 left join JDT1 T1 on T1.[ShortName] = T0.cardcode left join CRD1 T2 on T0.CardCode = T2.CardCode and T0.[ShipToDef] = T2.Address
WHERE T0.[CardType] = 'c' and T1.[RefDate] between [%0] and [%1]
Thanks & Regards,
Nagarajan
Hi,
Try this Query
SELECT Distinct T0.[CardCode], T0.[CardName],T2.Address,T2.Street,T2.Block,T2.City,T2.ZipCode,T2.County
FROM OCRD T0 left join JDT1 T1 on T1.[ShortName] = T0.cardcode LEFT OUTER join CRD1 T2 on T0.CardCode = T2.CardCode
WHERE T0.[CardType] = 'C' and T1.[RefDate] >= '[%0]'
Thanks,
Nithi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try Below Query,
SELECT distinct T1.[CardCode], T1.[CardName],T1.[CardType], max(T2.[Address])Address, max(T2.[Street])Street, max(T2.[Block])Block,max(T2.[City])City,max(T2.[County])County FROM JDT1 T0 inner join OCRD T1 On T1.[CardCode]=T0.[ShortName] INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode WHERE T0.[RefDate] <=[%0] GROUP BY T1.[CardCode], T1.[CardName],T1.[CardType] ORDER BY T1.[CardType], T1.[CardCode]
regards,
Ravuraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try with This query and Change the Cardtype as "c"
SELECT Distinct T0.[CardCode], T0.[CardName],T2.Address,T2.Street,T2.Block,T2.City,T2.ZipCode,T2.County
FROM OCRD T0 left join JDT1 T1 on T1.[ShortName] = T0.cardcode inner join CRD1 T2 on T0.CardCode = T2.CardCode
WHERE T0.[CardType] = 'C' and T1.[RefDate] >= [%0]
With Regards
Balaji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.