relation does not exist

Поиск
Список
Период
Сортировка
Искать

relation does not exist

От:
Robert Morgan <robert_@ihug.co.nz>
Дата:
Trying to run this query:

    UPDATE tblMonitor SET Make = 'Phillips' WHERE Make = 'Ph*';

get the error message that " Error:  relation "tblMonitor" does not exist"

yet when I look at the relations it is there.

               List of relations
 Schema |         Name         | Type  | Owner
--------+------------------+------+------
 public | UpdatePC's           | table | bob
 public | lkpBuildings           | table | bob
 public | lkpCPU                 | table | bob
.......

public | tblWorkstation        | table | bob
(23 rows)


Bob



Re: relation does not exist

От:
Stephan Szabo <sszabo@megazone.bigpanda.com>
Дата:
On Tue, 4 May 2004, Robert Morgan wrote:

> Trying to run this query:
>
>     UPDATE tblMonitor SET Make = 'Phillips' WHERE Make = 'Ph*';
>
> get the error message that " Error:  relation "tblMonitor" does not exist"

Does it really look exactly like that or does it show as tblmonitor in the
error message?

>
> yet when I look at the relations it is there.
>
>                List of relations
>  Schema |         Name         | Type  | Owner
> --------+------------------+------+------
>  public | UpdatePC's           | table | bob
>  public | lkpBuildings           | table | bob
>  public | lkpCPU                 | table | bob
> .......
>
> public | tblWorkstation        | table | bob

Well, this doesn't show tblMonitor, but given tblWorkstation, this
probably means you created the table with double quotes around the name
(or your interface did) which means you should use double quotes to refer
to it, so something like:
update "tblMonitor" ...

You may need to double quote the column names if the same is true there.
FAQ