You can write a function that modifies the SQL for a query but within a query the columns and table names cannot be parameters.
You could use IIf to get different column values based on a parameter but it's not as flexible as using a function and the column heading would still be static.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.