What's it: NOTICE: Adding missing FROM-clause entry

Started by Vitaliy V. Romanetsalmost 25 years ago3 messagesgeneral
Jump to latest
#1Vitaliy V. Romanets
vitaliy@gu.net

Hi All! :)
There are two tables:
test(a int4,b varchar(20));
test2(c int4,d varchar(20));
I do the following:
select a,b,test2.d from test where a=test2.c;

and i receive:
****
NOTICE: Adding missing FROM-clause entry for table "test2"
a | b | d
---+---+---
*result*
****
Question: what's this- NOTICE: Adding missing FROM-clause entry for table
"test2"

version: PostgreSQL 7.1

Thanks..

Sorry for my english...:)

#2Bruce Momjian
bruce@momjian.us
In reply to: Vitaliy V. Romanets (#1)
Re: What's it: NOTICE: Adding missing FROM-clause entry

Hi All! :)
There are two tables:
test(a int4,b varchar(20));
test2(c int4,d varchar(20));
I do the following:
select a,b,test2.d from test where a=test2.c;

Try this:

select a,b,test2.d from test test2 where a=test2.c;

You are creating a 'test' reference and a 'test2' reference, which I
doubt is what you wanted.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Peter Eisentraut
peter_e@gmx.net
In reply to: Vitaliy V. Romanets (#1)
Re: What's it: NOTICE: Adding missing FROM-clause entry

Vitaliy V. Romanets writes:

I do the following:
select a,b,test2.d from test where a=test2.c;
and i receive:
NOTICE: Adding missing FROM-clause entry for table "test2"

The query should be

select a,b,test2.d from test, test2 where a=test2.c;

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter