Re: DATE PROBLEM!
Date: 2000/05/18
Message-ID: <6l27isc52ijt9ggmqtrnc80tsagtaqb6aj_at_4ax.com>#1/1
On Tue, 16 May 2000 05:25:05 GMT, "Ray" <raymondsee_at_home.com> wrote:
>Hey all,
>
>Can anyone tell me what's the problem in this insert statement?
>
> Insert into book values ('0-044-45630-1', 'Empire boys : Adventures in a
>man's world', 'Joseph Bristol', 'Fiction', '07/99', '29.99', '35.99', '60',
>'McGraw-Hill Companies, Inc');
>
>I got some error message saying
>ERROR:
>ORA-01756: quoted string not properly terminated
>
>I suspect i didn't put the date correctly, any suggestions? I just need the
>month and year....July 1999!
>
>Thanks
>RAY
unmatched quotes in:
>'Empire boys : Adventures in a man's world',
for Oracle, double the apostrophe, escape with a backslash, or switch the enclosing quotes:
'Empire boys : Adventures in a man''s world',
'Empire boys : Adventures in a man\'s world',
"Empire boys : Adventures in a man's world",
The last won't work with Sybase/MS SQL Server, the first will, can't remember whether backslash does/-n't, other DBs YMMV.
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
-- Brian_Inglis_at_CSi.com (Brian dot Inglis at SystematicSw dot ab dot ca) use address above to replyReceived on Thu May 18 2000 - 00:00:00 CEST