Hi everyone,
I have a quick question. I'm wanting to be able to call a stored procedure, passing it two variables that will make up part of the table name.
How do I do a string concatination so that it'll get the variable value and not the variable name?
This is part of my SQL statement, but it always throws a "invalid column prefix" error
I want it to look like this after the variables are passed in.
Anyone know how to get this to work?
Thanks
I have a quick question. I'm wanting to be able to call a stored procedure, passing it two variables that will make up part of the table name.
How do I do a string concatination so that it'll get the variable value and not the variable name?
This is part of my SQL statement, but it always throws a "invalid column prefix" error
Code:
OPS.downline_+ @monthName +_+ @yearNum +.cons_id as Consultant
I want it to look like this after the variables are passed in.
Code:
OPS.downline_aug_2003.cons_id as Consultant
Anyone know how to get this to work?
Thanks