-
simple string problem
hi,
I have got a script which send emails out.
my problem is that the person that it is trying to send the email to has got a name O'REILLY, PAULINE
and ' is causing the problem as in
master..xp_sendmail @recipients='O'REILLY, PAULINE',@message='This is an auto-generated message by Firmware.
It doesn’t not recognize O'REILLY, PAULINE as a whole string
and way around the problem?
Many Thanks
Shaunt
-
don't know the specifics of the sendmail but usually one of the following solves the problems with quotes within a string.
1. escape the character
ex. 'O\'REILLY, PAULINE'
2. use two quotes
ex. 'O''REILLY, PAULINE'
3. use different outer quotes
ex. "O'REILLY, PAULINE"
hope it helps
-
I have to go to the last option
3. use different outer quotes
ex. "O'REILLY, PAULINE"
but as it is sql 7 it inot excepting it
-
this quite urgent
please help
-
What error you get. Both option 2 and 3 should work.
If you want to use option 3, you should run
SET QUOTED_IDENTIFIER OFF
-
many thanks
that was what I needed
problem sorted
cheer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|