[Zope] ZSQL: ValueError, Duplicate column name
Andreas Hölzl
hoelzla@uni-freiburg.de
Tue, 05 Mar 2001 10:22:47 +0100
hi,
i have the following problem when using ZSQL with special SQL-queries:
When creating a simple ZSQL-method for quering two different tables
with both a column of the same name like
SELECT
person.last_changed, work.last_changed
FROM
person, work
a ValueError "Duplicate column name" occurs.
I located the "problem" in "lib/python/Shared/DC/ZRDB/Results.py":
123: if schema.has_key(name):
124: raise ValueError, 'Duplicate column name, %s' %
name
I made a workaround with an external python method directly quering
the database.
But my question is:
Is there also a workaround with dtml/ZSQL?
I do not think that it is a good idea to force unique table column
names for a complex database. Whats the reason for this limitation?
dtml-var ?
Thanks in advance,
Andreas Hölzl
Freiburg, Germany