Thread: RE: [INTERFACES] Uppercase problem with several interfaces

RE: [INTERFACES] Uppercase problem with several interfaces

From
Peter Mount
Date:
Unless the field names are in quotes, the parser forces them into
lowercase, so in your example, you would change it to:

select 'Name' from 'Services';

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.


> -----Original Message-----
> From:    Fabio.di.Fabio [SMTP:Lmib@yahoo.com]
> Sent:    29 October 1999 11:12
> To:    Psql-interfaces
> Subject:    [INTERFACES] Uppercase problem with several interfaces
> 
> Hi,
> 
> I've a problem with uppercase letter in table and fields definition.
> 
> For example let be a table called 'Services' with fields 'Id' 'Name'
> 'Vaule', now if with PHP or pgaccess ort psql I make this query:
> 
> SELECT Name FROM Services;
> 
> I got this:
> 
> ERROR: attribute 'name' not found. 
> 
> what is wrong with my configuration?
> 
> ciao,
>     Fabio.
> 
> 
> ************


Re: [INTERFACES] Uppercase problem with several interfaces

From
Sebastien Flacher
Date:
Hello everybody,

for psql and from the perl interface,
the correct syntax seems to be:

select "field" from "table" where "field"='value';

... with the single quotes to be protected with \ when the request is sent to the backend from a script  (rather than
psql);

Peter Mount wrote:
> 
> Unless the field names are in quotes, the parser forces them into
> lowercase, so in your example, you would change it to:
> 
> select 'Name' from 'Services';
> 
> >
> > I've a problem with uppercase letter in table and fields definition.
> >
> > For example let be a table called 'Services' with fields 'Id' 'Name'
> > 'Vaule', now if with PHP or pgaccess ort psql I make this query:
> >
> > SELECT Name FROM Services;
> >
> > I got this:
> >
> > ERROR: attribute 'name' not found.
> >
> > what is wrong with my configuration?
> >
> > ciao,
> >       Fabio.
> >
> >
> > ************
> 
> ************

-- 
Sebastien Flacher
Software Engineer - Network Engineering
sflacher@globalmedia.com

Global Media Corporation
phone: 888.322.2282 - http://www.globalmediacorp.com


Re: [INTERFACES] Uppercase problem with several interfaces

From
Hannu Krosing
Date:
Peter Mount wrote:
> 
> Unless the field names are in quotes, the parser forces them into
> lowercase, so in your example, you would change it to:
> 
> select 'Name' from 'Services';
> 

Actually it should be

select "Name" from "Services";

single quotes (') ar for strings.

-------------
Hannu