Re: quotes within quotes

From: Mark Powell <Mark.Powell_at_eds.com>
Date: 27 Apr 1999 13:14:17 GMT
Message-ID: <01be90af$ef5eda40$a12c6394_at_J00679271.ddc.eds.com>


Instead of double quotes use back to back single quotes and I think you will get what you want. Oracle will read '' as one single quote character and not as a delimiter.

Leona Vo <leona.vo_at_trw.com> wrote in article <37250B7B.DB87B726_at_trw.com>...
> Hello,
> I'm trying to create a lexical variable with the following query:
> select * from table_name
> &where_var;
> In my program I have
> :where_var := 'where name = "WHOMEVER"';
>
> Upon running the report I got this error:
> ORA - 00904: Invalid column name select * from table_name where name
>
> = "WHOMEVER"
>
> I tried single quotes but the compiler would not let me compile.
> However, if I use double quotes as above I get that error because SQL
> doesn't take "" in the where clause. Any ideas? Or am I assigning
> lexical variable incorrectly? How else would I assign a lexical
> variable?
>
> Thank you.
>
>
Received on Tue Apr 27 1999 - 15:14:17 CEST

Original text of this message