I have looked at the following thread and its related links for RODBC help when it comes to passing an argument to sqlQuery: Pass R variable to RODBC's sqlQuery with multiple entries?
I have a function that takes in a year argument as a data table and the function will run smoothly when only one year is used as a filter but not if multiple years are inputted.
What's weird is that the function ran on my PC smoothly using multiple year filter before but now I'm getting the following error when I run it now:
42S02 208 [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Output'.[RODBC] ERROR: Could not SQLExecDirect 'select * from ##Output'
I have all of my ODBC set up correctly, I think, that's why it runs when sqlQuery is only filtered with one year.
If someone could explain to me any possible reason why the function is not running on a multiple year argument would be great.