[Zope] something wrong with ZSQL

Jaroslav Lukesh lukesh at seznam.cz
Tue Apr 27 06:02:43 EDT 2004


Samuele Giovanni Tonon wrote:
> hi to all,
> 
> supposes you have a ZSQL method of this kind
> 
> select  table1.name, table1.lastname, table2.name, table2.lastname
> from table1, table2
> where table1.cod = table2.cod

You need to use this:

select
	table1.name as table1_name,
	table1.lastname as table1_lastname,
	table2.name as table2_name,
	table2.lastname as table2_lastname
from table1, table2
where table1.cod = table2.cod


> however this gives an error :
> Error Type: ValueError
> Error Value: Duplicate column name, name


-- 

Jaroslav Lukeš

--
Tento e-mail nemu*že obsahovat VIRY
jelikož nepocházi z virózního systému M$ Windows!




More information about the Zope mailing list