Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insertion problem?????????

Author  Topic 

sweet123
Starting Member

1 Post

Posted - 2010-02-23 : 00:34:42
Hi all,

I have one table:
upc_notes

in this table field 'notes'(varchar) i want to insert single char value inside the notes field .ex:ki'ra'ra'vi'su'resh

insert into upc_notes(control,cusomer,lineno,notes)
values('2182','RALPHS','4','44'44'44')


how to do.

i am trying to insert i am getting syntax error how to do.........

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-02-23 : 00:50:43
specify the single quote twice

values('2182','RALPHS','4','44''44''44')



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2010-02-23 : 00:52:07
Go through this


http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-02-23 : 01:06:45
Try this also

select '','''','''''','''''''',''''''''''''

PBUH
Go to Top of Page
   

- Advertisement -