on 03-11-2010 5:27 AM
Hi Experts,
How do I get Sales Executive name (From OSLP Table) in the following query?????????????????
SELECT T0.Docnum,T0.DocStatus, T0.DocDate,T2.SeriesName,
T0.CardCode, T0.CardName, T1.itemcode, T1.Dscription,T1.Quantity,T1.U_RQT RoboQuantity,
T1.Price, T1.U_KM, T0.VatSum, T0.DocTotal, T0.DocTotalSy, T1.U_VHNO, T1.U_GRSRMR,T1.U_DCNO,T1.ShipDate,
T0.comments FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN NNM1 T2 ON T0.Series = T2.Series
WHERE (T0.DocDate >= [%0] AND T0.DocDate <= [%1]) and T2.SeriesName = [%2] and T0.CANCELED='N'
Please do the needfull.
Regards,
Sree.
Hi Sree,
You can try this;
SELECT T0.[DocNum], T0.[DocStatus], T1.[SeriesName], T0.[CardCode], T0.[CardName], T0.[SlpCode], T2.[SlpName] FROM [dbo].[ORDR] T0 INNER JOIN NNM1 T1 ON T0.Series = T1.Series INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode WHERE T0.[DocDate] >= [%0] and T0.[DocDate] <= [%1]
Include your udf's in this query.
Thanks,
Joseph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sree,
You may try this one and add your UDF if works:
SELECT T0.Docnum,T0.DocStatus, T0.DocDate,T2.SeriesName,
T0.CardCode, T0.CardName, T3.SLPName, T1.itemcode, T1.Dscription,T1.Quantity,
T1.Price, T0.VatSum, T0.DocTotal, T0.DocTotalSy,T1.ShipDate,T0.comments
FROM dbo.ORDR T0 INNER JOIN dbo.RDR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN dbo.NNM1 T2 ON T0.Series = T2.Series
INNER JOIN dbo.OSLP T3 ON T0.SlpCode = T3.SlpCode
WHERE T0.DocDate BETWEEN [%0\] AND [%1\] and T2.SeriesName = [%2\] and T0.CANCELED='N'
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.