Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: What does "N" do in a WHERE clause?

Re: What does "N" do in a WHERE clause?

From: Rumpi Gravenstein <rgravens_at_gmail.com>
Date: Wed, 21 Mar 2007 16:35:34 -0400
Message-ID: <9c9b9dc90703211335g298bdc8eqaa0241c011c7a4a7@mail.gmail.com>


Rich,

The N is used to specify the literal is using the national character set. Text entered using this notation is translated into the national character set by Oracle. All of this is documented in the SQL language manual under text literals.

On 3/21/07, Rich Jesse <rjoralist_at_society.servebeer.com> wrote:
>
> Hey all,
>
> Getting used to a new Oracle 10.1.0.5.0 environment and am finding new and
> fun things every day. The latest I found is a SELECT statement, generated
> by Crystal Enterprise 10 if it matters, that has an odd syntax that I
> haven't seen before. Here's a snip:
>
> WHERE NOT( MYTAB"."SDLNTY" = N'F'
> OR "MYTAB"."SDLNTY" = N'NS' )
> AND "MYTAB"."SDNXTR" < N'999'
> AND "MYTAB"."SDECST" = 0
>
> The part that caught my eye in this loosely veiled query piece is the "N"
> modifier, or whatever it is. It doesn't look like a function, but it
> seems
> to be acting like CAST(). If it's important, the SQL is in ANSI syntax.
>
> There's nothing that I could find browsing the SQL Reference doc and
> trying
> to Google "ANSI SQL N" didn't help, either. ;)
>
> Anyone seen this before?
>
> TIA!
> Rich
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Rumpi Gravenstein

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 21 2007 - 15:35:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US