Hi,
I am using C# code to retreive values from a table in sequel.
This is done using a join between a table containg values and one using dates.
The problem is that I am unable to retrieve a value for days where there is no value. I would like to return a 'NULL' value or even a ' 0 ' value if no amount is found for that specific date/day.
SELECT COUNT(*) AS Expr1
FROM db.sales_month RIGHT OUTER JOIN
db.sales_dates ON dbo.sales_month .full_date = db.sales_dates.[Date] AND db.sales_month. full_date = db.sales_dates.[Date]
WHERE (db.sales_month .prod_name = 'Chairs') AND
GROUP BY db.sales_month. full_date
ORDER BY db.sales_month. full_date
I am using C# code to retreive values from a table in sequel.
This is done using a join between a table containg values and one using dates.
The problem is that I am unable to retrieve a value for days where there is no value. I would like to return a 'NULL' value or even a ' 0 ' value if no amount is found for that specific date/day.
SELECT COUNT(*) AS Expr1
FROM db.sales_month RIGHT OUTER JOIN
db.sales_dates ON dbo.sales_month .full_date = db.sales_dates.[Date] AND db.sales_month. full_date = db.sales_dates.[Date]
WHERE (db.sales_month .prod_name = 'Chairs') AND
GROUP BY db.sales_month. full_date
ORDER BY db.sales_month. full_date
Comment