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

SQL Query to show Customers in a particular Post Code area

$
0
0

Thanks to some help from the guys on the forum I came up with this very useful query. It shows BPs in a particular Post Code area and what they have bought. Very useful for our Sales Reps when they are out booking meetings

 

SELECT DISTINCT T2.[DocNum], T0.[CardCode], T0.[CardName], T1.[ZipCode], T2.[DocDate], T3.[Dscription]

 

FROM OCRD T0 INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode INNER JOIN ORDR T2 ON T0.CardCode = T2.CardCode INNER JOIN RDR1 T3 ON T2.DocEntry = T3.DocEntry

 

WHERE T1.[ZipCode] like '[%0]%'


Viewing all articles
Browse latest Browse all 10446

Trending Articles



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