I need to query a database selecting two fields whose names vary by a number depending on the month.
I have used MSQuery to give me an SQL statement and I am trying to modify this so that I can choose the month whose data I want.
I have ended with this which does not work.
n is a number from 1 to 12 which enables me to choose. I have not got the sequence of quotes around n right. I am also worried about the single quotes around the ACTUAL_LAST_YEAR#Please Login or Register to view this content.
And ACTUAL_MONTH# as they don't appear in ACCOUNT_NUMBER or ACCOUNT_NAME. (They were in the MSQuery sql string)
I hope somebody will help me get the right syntax
John
Bookmarks