May 28, 2018 at 5:26 am
Hi Team,
I facing some problem at the time inserting the data,
for example:
I insert the one sp into one column of the table its through some exception. please help me
eg:
insert into tblSp(Script,Display,Remarks)
values('Create procedure [dbo].[Delete]
@Id int = null
as
begin
update master
set Status=0,
DeleteDate=getdate(),
Reason = 'Test '
end
','Delete','new')
--> it's through exception on 'Test '
please tell me how to insert the data
May 28, 2018 at 5:37 am
you need to escape the single quotes for that field - so 'test' becomes ''test''
May 28, 2018 at 7:01 am
rabbanishaik.net - Monday, May 28, 2018 5:26 AMHi Team,I facing some problem at the time inserting the data,
for example:
I insert the one sp into one column of the table its through some exception. please help me
eg:
insert into tblSp(Script,Display,Remarks)
values('Create procedure [dbo].[Delete]
@Id int = null
as
begin
update master
set Status=0,
DeleteDate=getdate(),
Reason = 'Test 'end
','Delete','new')--> it's through exception on 'Test '
please tell me how to insert the data
Out of interest, can you explain what this table will be used for? Also, what is the @Id variable for?
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply