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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Sql Query

Author  Topic 

nalin_769
Starting Member

16 Posts

Posted - 2008-09-11 : 02:55:31
My query is SELECT SupplerName FROM Supplier it will rerun

In Fashion Int'l Co Ltd

In this value contain singel inverted comma.

When I go to Insert this to another table it will produce error

How do correct it?

Thank You

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-09-11 : 02:57:16
single quotes need to be escaped by doubling them. eg:

insert foo
select 'In Fashion Int''l Co Ltd'


elsasoft.org
Go to Top of Page

nalin_769
Starting Member

16 Posts

Posted - 2008-09-11 : 03:23:44
How do I indentify singel inverted comma in sql statement value ?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-09-11 : 05:51:50
quote:
Originally posted by nalin_769

How do I indentify singel inverted comma in sql statement value ?



where col like '%''%'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-09-11 : 08:10:54
quote:
Originally posted by nalin_769


When I go to Insert this to another table it will produce error




How do you insert to another table ? Can you show us your code ?


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

Go to Top of Page
   

- Advertisement -