![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
This doesn't seem right: CREATE VIEW inci AS SELECT date, inci_id, protocol, a.ip_addr, b.ip_addr, spt, dpt FROM (SELECT addr_id, ip_addr FROM addrs) AS a JOIN incident ON incident.source_addr_id =3D a.addr_id=20 JOIN (SELECT addr_id, ip_addr FROM addrs)=20 AS b ON incident.destination_addr_id =3D b.addr_id JOIN protocols USING( protocol_id ); Produces: ERROR: column "ip_addr" duplicated |
#2
| |||
| |||
|
|
Robert Creager <Robert_Creager (AT) LogicalChaos (DOT) org> writes: This doesn't seem right: =20 [ snip embarrassing mistake ] =20 Why doesn't it seem right? You're asking it to generate a view with two columns both named ip_addr. Use "AS" to rename one or both. =20 |
#3
| |||
| |||
|
|
So the SELECT can manage this bot not the VIEW? |
![]() |
| Thread Tools | |
| Display Modes | |
| |