TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Riddhi Valecha
422
3.3k
415.5k
Dynamic SQL Query
Oct 10 2013 1:31 AM
Hi all...
I have a dynamic query as follow in stored procedure-
@EMPID int = NULL,
@ENAME varchar(50) = NULL
Declare @SQLQUERY as NVARCHAR(MAX)
set @SQLQUERY = 'Select * from EMP where 1=1'
if @EMPID IS NOT NULL
set @SQLQUERY = ' and EMP.ID ='+@EMPID
-----
Here I get an error-
Conversion failed when converting the nvarchar value 'select * From emp where EMP.ID=' to data type int.
Please help me out..
Thanks a lot.. in advance
Reply
Answers (
3
)
how to display countdown timer in asp.net?
How to disable the network authentication in my website?