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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle SQL Formats??

Re: Oracle SQL Formats??

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Tue, 2 Oct 2001 20:01:39 +0100
Message-ID: <3bba16ce_1@mk-nntp-1.news.uk.worldonline.com>


I generally recommend explicitly specifying the date format wherever possible; i.e. instead of
"select x from y where datecolumn = '02-OCT-2001'", use: "select x from y where datecolumn = to_date ('02-OCT-2001','DD-MON-YYYY')". That way we don't need to worry about registry settings and the like.

Paul

"Nuno Souto" <nsouto_at_optushome.com.au.nospam> wrote in message news:3bb85b49.1568049_at_news...
> On Mon, 1 Oct 2001 13:34:41 +0200, "Alexander" <abauer_at_gmx.net> wrote:
>
> >- Searching varchar2-fields is case-sensitive:
> >...where field LIKE '%text%' will not return 'TEXT...'
> >I would need case-insensitive search, what can I do?
>
> Create a function-based index on UPPER(field).
>
> >
> >- MSSQL-Server allows to use [fieldname] if the fieldname is a reseved
> >keyword.
> >What can be used in Oracle-SQL??
>
> Double quotes. As in "fieldname".
>
> >
> >- Dateformat: yyyy-mm-dd seems to be not supported.
> >I need to enter dd.mm.yy, but this maybe is a regional setting of my
> >computer.
> >Any suggestions how to use date-formats (maybe
> >regional-setting-independent)??
>
> You can set the default date format at both server and client ends.
>
> >
> >- I search for auto-values (self-increasing) for the primary-key-field.
> >I could not find such a setting. How can I create auto-incrementing
fields
> >in Oracle?
>
> Search this newsgroup in google. There are plenty of instances of
> answers to this question.
>
> >
> >- Is there no boolean-field in orcale?
> >-Do I have to use number (LONG)?
>
> Not sure if this is two questions or one. Boolean does not exist as a
> table data field, but it exists for PL/SQL. Unfortunately, I don't
> think you can store it as boolean.
>
> If you want a classic C-like boolean (long integer), it doesn't exist.
> I suggest you use a char(1)?
>
>
> Cheers
> Nuno Souto
> nsouto_at_optushome.com.au.nospam
Received on Tue Oct 02 2001 - 14:01:39 CDT

Original text of this message

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