Skip to content

Tag: sql

CASE WHEN with GROUP BY

I have the following query : I get this following error : Column ‘Status’ is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. Answer

SQL query that has a lookup field

I have a table Invoices that has 3 fields: InvoiceProductCode InvoiceQuantity InvoicePrice InvoiceProductCode can be blank, but if it’s not blank, I would like it to be filled with a value from …