Bill Crawley
July 18th, 2005, 05:33 AM
select count(*) as printed from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 1
select count(*) as errors from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 2
select count(*) as reprint from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 3
select count(*) as totals from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103)
This is SQLServer 2000
I want a result returned for each of the above statements in a single line. Union doesn't work because if say the first 2 are 0, 3rd is 3 and the 4th is 10, then I only get three results being returned 0,3,10 when I want 0,0,3,10
Thanks
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 1
select count(*) as errors from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 2
select count(*) as reprint from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103) and Status = 3
select count(*) as totals from quote_request_table
where convert(varchar,request_date,103) = convert(varchar,getdate(),103)
This is SQLServer 2000
I want a result returned for each of the above statements in a single line. Union doesn't work because if say the first 2 are 0, 3rd is 3 and the 4th is 10, then I only get three results being returned 0,3,10 when I want 0,0,3,10
Thanks