Re: Text Delimiters
- From: "Nigel Vandyk" <sales@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Apr 2007 22:40:14 +0100
Thanks very much for that, Bill
--
With best wishes
Nigel Vandyk
Website:www.astarsoftware.co.uk
"William (Bill) Vaughn" <billva@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23gCfI2GgHHA.2432@xxxxxxxxxxxxxxxxxxxxxxx
This problem can be solved by either doubling the single quotes as in
... 'O''Malley',...
or (better yet) use Parameters for your input parameters. These solve
other framing issues (as when using dates etc.)
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest books:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition) and
Hitchhiker's Guide to SQL Server 2005 Compact Edition
-----------------------------------------------------------------------------------------------------------------------
"Nigel Vandyk" <sales@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OzQzfnGgHHA.4064@xxxxxxxxxxxxxxxxxxxxxxx
I am sure that lots of people must know the answer to this but I can't
find it anywhere.
If I want to insert a Firstname and Surname into an SQLCE table called
Clients I would use
INSERT INTO Clients (Firstname,Surname) VALUES('Fred','Bloggs')
but what happens if I want to insert Paddy O'Brian or Michael O'Connor
Because we are using an apostrophe in their names, this will cause the
Insert statement to fail
In Access I would use chr(34) to delimit the strings. Is there a way
round this in SQLSERVERCE?
--
With best wishes
Nigel Vandyk
Website:www.astarsoftware.co.uk
.
- References:
- Text Delimiters
- From: Nigel Vandyk
- Re: Text Delimiters
- From: William \(Bill\) Vaughn
- Text Delimiters
- Prev by Date: Re: Text Delimiters
- Next by Date: Re: Text Delimiters
- Previous by thread: Re: Text Delimiters
- Next by thread: Re: Text Delimiters
- Index(es):
Relevant Pages
|
Loading