tempo1
Programmer
- Feb 20, 2007
- 118
Hi everyone,
I have a procedure within whice i execute a function as follows:
and a function that runs dynamic sql
.
When it comes to running that dynamic sql i get the following error message:
What do i do instead ?
Thanks
I have a procedure within whice i execute a function as follows:
Code:
SELECT
'bbb',
DBO.statusecond ('%aaa%',
'20070801')
COMMIT
Code:
exec(@dynamic)
When it comes to running that dynamic sql i get the following error message:
. Why is that ? Must i not run dynamic sql from a function ?Server: Msg 443, Level 16, State 2, Procedure statusecond, Line 31
Invalid use of 'EXECUTE' within a function.
What do i do instead ?
Thanks