Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Interesting Facts about execute command in SQL Server
WhatsApp
Venkatesan Jayakantham
12y
7.7
k
0
1
25
Blog
Possible Error :
Procedure expects parameter '@handle' of type 'int'.
Reason for this error: From the error, you are able to predict that, the issue is due to the datatype. This issue may occur, if you are trying to execute a dynamic sql.
Try to execute the sql with sp_executesql.
Two options of executing to your sql
exec(@sql) or exec sp_executesql @sql
I've succeeded the above issue and caught up the below issue now,
Invalid use of side-effecting or time-dependent operator in 'EXECUTE STRING' within a function.
The reason is, I am trying to use the exec sp_execuesql method inside a function which is not accepted by SQL Server. Here is a fantastic guide for your apetite.
http://jimbojw.com/wiki/index.php?title=SQL_2005_-_Why_You_Can't_EXEC()_Inside_a_UDF
Cheers,
Venkatesan Prabu. J
Head, KaaShiv InfoTech,
http://www.kaashivinfotech.com/
Interesting Facts about execute command in SQL Server
Up Next
Call or execute a Stored Procedure from Select Statement in SQL Server using OPENROWSET
Ebook Download
View all
SQL Queries For Beginners
Read by 18.3k people
Download Now!
Learn
View all
Membership not found