Re: [SQL] Syntax question: use of join/using with fully qualified table name

2008-01-27 Thread Tom Lane
Bryce Nesbitt <[EMAIL PROTECTED]> writes: > I've got a join where a certain column name appears twice: > select username,last_name from eg_member join eg_membership using > (member_id) join eg_account using (account_id) join eg_person using > (person_id); > ERROR: common column name "person_id" ap

Re: [SQL] Syntax question: use of join/using with fully qualified table name

2008-01-27 Thread Martin Marques
Bryce Nesbitt escribió: I've got a join where a certain column name appears twice: select username,last_name from eg_member join eg_membership using (member_id) join eg_account using (account_id) join eg_person using (person_id); ERROR: common column name "person_id" appears more than once in l

[SQL] Syntax question: use of join/using with fully qualified table name

2008-01-27 Thread Bryce Nesbitt
I've got a join where a certain column name appears twice: select username,last_name from eg_member join eg_membership using (member_id) join eg_account using (account_id) join eg_person using (person_id); ERROR: common column name "person_id" appears more than once in left table My first incli

Re: [SQL] syntax question

2003-02-24 Thread Josh Berkus
Jeff, > I think Josh meant to say you can't select the results of a *dynamically > constructed* query without a loop --- that is, you need FOR ... EXECUTE. > A plain EXECUTE doesn't support plpgsql's notion of SELECT INTO. That's correct. See the rest of the thread. -- Josh Berkus Aglio Databa

Re: [SQL] syntax question

2003-02-23 Thread Josh Berkus
James, > but thats what: > rec record > select into rec id from table; > return rec.id > > does > > my question was can i do this with a query built inside a string? No. That's what I was talking about. You have to use the loop. -- Josh Berkus Aglio Database Solutions San Francisco