Hi
I've created a query in the query analyzer and it worked fine. Then i used that query to make a stored procedure. when I call this stored procedure in the query analyzer I get the following message :
"invalid column name : XXX"
the xxx is the name of a string parameter.
The stored procedure gets 4 parameters and one of those is the name of another database.
In the stored procedure, I create a new table for inserting the data.
to insert the data in the table, a use simular code:
execute('
INSERT INTO(xx,yy,zz,...)
SELECT '+databasepointer+'.dbo.bla.xx,
'+databasepointer+'.dbo.bla.yy,...
from '+databasepointer+'.dbo.bla
inner join lala
on '+databasepointer+'.dbo.bla.lll = lala.lll
where lala.kk = "'+astringpointer+'" ')
the error is generated on "'+atringpointer+'"
could someone help me with this problem?
björn
I've created a query in the query analyzer and it worked fine. Then i used that query to make a stored procedure. when I call this stored procedure in the query analyzer I get the following message :
"invalid column name : XXX"
the xxx is the name of a string parameter.
The stored procedure gets 4 parameters and one of those is the name of another database.
In the stored procedure, I create a new table for inserting the data.
to insert the data in the table, a use simular code:
execute('
INSERT INTO(xx,yy,zz,...)
SELECT '+databasepointer+'.dbo.bla.xx,
'+databasepointer+'.dbo.bla.yy,...
from '+databasepointer+'.dbo.bla
inner join lala
on '+databasepointer+'.dbo.bla.lll = lala.lll
where lala.kk = "'+astringpointer+'" ')
the error is generated on "'+atringpointer+'"
could someone help me with this problem?
björn