SQL Server Management Studio Express
Maybe you could help me with this:
I have to do a report based on a script I wrote.
SELECT
TA.ReportingDate,
TB.JobNumber,
TB.Sales,
TC.Amount,
TC.Tn
FROM
TC,TA,TB
where
SUBSTRING(TC.Ref,4,7)= TA.Number
AND TB.JobNumber=TA.Number
AND TC.Tn<>''
AND YEAR(TA.ReportingDate)=2012
AND month(TA.ReportingDate)=1
Desired output:
Job Sales Amount
11 50 100
12 20 40
16 70
14 40 200
.....
Ouput I got:
Job Sales Amount
11 50 100
12 20 40
14 40 200
....
Maybe you could help me with this:
I have to do a report based on a script I wrote.
SELECT
TA.ReportingDate,
TB.JobNumber,
TB.Sales,
TC.Amount,
TC.Tn
FROM
TC,TA,TB
where
SUBSTRING(TC.Ref,4,7)= TA.Number
AND TB.JobNumber=TA.Number
AND TC.Tn<>''
AND YEAR(TA.ReportingDate)=2012
AND month(TA.ReportingDate)=1
Desired output:
Job Sales Amount
11 50 100
12 20 40
16 70
14 40 200
.....
Ouput I got:
Job Sales Amount
11 50 100
12 20 40
14 40 200
....