soulpumpkin
Programmer
I'm getting a syntax error when running a stored procedure. I'm trying to extract values from one table and store them in a temp table. The below code is from stored procedure:
Here is the code that gives me the correct results from the SQL Query Analyzer:
I'm sure it is simple, but after staring at it and trying a few different things I'm starting to get frustrated and blinding myself.
Any help would be appreciated.
Thanks,
Soul Pumpkin
Code:
execute('INSERT INTO tblTemp SELECT Brand, Measure, Market,
Week, NULL, NULL, NULL,
Value, Brand+' + '.' + '+Measure
FROM tblValues_' + @ProjectID)
Here is the code that gives me the correct results from the SQL Query Analyzer:
Code:
SELECT Brand,Measure,Week,NULL,NULL,NULL,Brand+'.'+Measure as code FROM tblValues_23
I'm sure it is simple, but after staring at it and trying a few different things I'm starting to get frustrated and blinding myself.
Any help would be appreciated.
Thanks,
Soul Pumpkin