I have created a stored procedure that executes another stored procedure from a different database.
This statement is working 100%.
I want to call a stored procedure when selecting a different database name in a select statement and call the select statement in exec.
When I do the following statements I get an error.
SELECT @StrConfig=ConfigValue FROM lConfig WHERE ConfigName = 'GESDBName'
- Selecting the database name (GES)from the table
Msg 102, Level 15, State 1, Procedure pSEL_GlobalStocklist, Line 28
Incorrect syntax near '.'.
What's wrong with the Exec statment?