P
pol
Please let me know to give if condition in MSAccess
For example I have a table SALES with following structure
salesamt
docdate
want to select 'SALESAMT' TABLE COLUMN as follows
if year(docdate) = year(day()) then
select 'SALESAMT' as currentsale from SALES
end if
if year(docdate) = year(day()) - 1 then
select 'SALESAMT' as previoussales from SALES
end if
Please let me know how I can give the above condition in one SQL.
With thanks
Pol
For example I have a table SALES with following structure
salesamt
docdate
want to select 'SALESAMT' TABLE COLUMN as follows
if year(docdate) = year(day()) then
select 'SALESAMT' as currentsale from SALES
end if
if year(docdate) = year(day()) - 1 then
select 'SALESAMT' as previoussales from SALES
end if
Please let me know how I can give the above condition in one SQL.
With thanks
Pol