J
Jahanzaib
Following sql statement is used:
SELECT TSales.OrderDate, TSales.Unit, BundlesTbl.Segment, BundlesTbl.Rule,
BundlesTbl.Amount, TSales.SumOfAmount AS TSales
FROM TSales LEFT JOIN BundlesTbl ON TSales.CheckDate = BundlesTbl.CheckDate;
For obtainnig this (*Tsales from Tsales is repeating):
OrderDate Unit Segment Rule Amount TSales
04/04/08 A 1 Bundle 6 3600 139385
04/04/08 A 2 Bundle 4 2400 139385
04/04/08 B 2 Bundle 4 1600 129376
04/04/08 B 1 Bundle 6 1200 129376
How can I obtain this (T Sales only one time for each unit each day):
OrderDate Unit Segment Rule Amount TSales
04/04/08 A 1 Bundle 6 3600 139385
04/04/08 A 2 Bundle 4 2400 0
04/04/08 B 2 Bundle 4 1600 129376
04/04/08 B 1 Bundle 6 1200 0
Thanks
SELECT TSales.OrderDate, TSales.Unit, BundlesTbl.Segment, BundlesTbl.Rule,
BundlesTbl.Amount, TSales.SumOfAmount AS TSales
FROM TSales LEFT JOIN BundlesTbl ON TSales.CheckDate = BundlesTbl.CheckDate;
For obtainnig this (*Tsales from Tsales is repeating):
OrderDate Unit Segment Rule Amount TSales
04/04/08 A 1 Bundle 6 3600 139385
04/04/08 A 2 Bundle 4 2400 139385
04/04/08 B 2 Bundle 4 1600 129376
04/04/08 B 1 Bundle 6 1200 129376
How can I obtain this (T Sales only one time for each unit each day):
OrderDate Unit Segment Rule Amount TSales
04/04/08 A 1 Bundle 6 3600 139385
04/04/08 A 2 Bundle 4 2400 0
04/04/08 B 2 Bundle 4 1600 129376
04/04/08 B 1 Bundle 6 1200 0
Thanks