[Zope-DB] (no subject)

Gareth Evans g.evans@rms.co.uk
Thu, 19 Dec 2002 11:00:44 -0000

hi I'm using=20
(Zope 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, =
ZMySQLDA (Installed product ZMySQLDA (ZMySQLDA 2.0.8))  =
this seems to work fine for simple selects inserts etcetera but I'm =
trying to do the following join in a z sql method

select * from snmp_trap_entry, snmp_trap_vars where =
snmp_trap_vars.auto=3Dsnmp_trap_entry.auto and snmp_trap_vars.auto=3D4

I get the following failure
Error Type: ValueError
Error Value:=20
Voyager Error Voyager has encountered an error while publishing this =
resource. Error Type: ValueError Error Value: Duplicate column name, =

the above command works fine when I run it from the mysql prompt

auto	trap	datestamp	trapoid	trapfull	target	enterprise	community	=
generictrap	specifictrap	version	severity	ack	auto	var	num
4	LINKDOWN	2002-12-17 16:52:36	0	NULL	NULL	NULL	NULL	NULL	=
NULL	1	0	4	4	1

describe of snmp_trap_vars
Field	Type	Null	Key	Default	Extra
auto	int(11)	YES		NULL=09
var	char(50)	YES		NULL=09
num	int(11)	YES		NULL=09

describe of snmp_trap_entry
Field	Type	Null	Key	Default	Extra
auto	int(11)		PRI	NULL	auto_increment
trap	char(50)	YES		NULL=09
datestamp	datetime	YES		NULL=09
trapoid	char(50)	YES		NULL=09
trapfull	char(50)	YES		NULL=09
target	char(50)	YES		NULL=09
enterprise	char(80)	YES		NULL=09
community	char(50)	YES		NULL=09
generictrap	char(80)	YES		NULL=09
specifictrap	char(80)	YES		NULL=09
version	char(10)	YES		NULL=09
severity	int(11)	YES		NULL=09
ack	int(11)	YES		NULL=09

what am i doing wrong ?
cheers G
This message has been Virus Scanned by old women and
that poor water boy Hando Jin :- Han Wong's son.
The Song "Hot Shot City" is particularly good