Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to use group in a SQL statement
Adding to this: Put single quotes around your literal.
> > select * from example
> > where "GROUP" = 'mygroup';
^^^^^^^^
Anurag
"Dave Hau" <davehau_nospam_123_at_nospam_netscape.net> wrote in message news:3F848273.2040608_at_nospam_netscape.net...
> When you put double quotes around a column name, the name is case
> sensitive. So first do:
>
> desc example
>
> and take note of the exact name of the "group" column including case,
> i.e. whether it's named "group" or "GROUP" or something else. Then put
> double quotes around the case-sensitive name and it should work.
>
> HTH,
> Dave
>
>
>
>
>
> Tom Miskiewicz wrote:
> > Hello!
> >
> > I have a field called group. I'd like to write a SQL statement using the
> > group field in the where clause, however the SQL Worksheet recognizes it as
> > an reserved word only.
> >
> >
> > select * from example
> > where group = "mygroup";
> >
> > How to get this working? I'm using Oracle 9.2 and I did try to put " and '
> > around the field name.
> >
> >
> > thanks
> > Tom
> >
> >
>
Received on Wed Oct 08 2003 - 19:03:31 CDT