Mike,
I created a view using the following command:
CREATE TEMPORARY VIEW vwTemp1 (junk, junk1, junk2,
junk1) +
AS SELECT stmtdate, journal, endbal, entryday FROM stmtbal
Then I checked to see the column definitions:
EDIT ALL FROM sys_columns
Sure enough, for that view there were 4 columns:
junk DATE
junk1 TEXT
junk2 CURRENCY
junk1 DATE
In other words, in my view, I have a column called
junk1 whose
data type is TEXT, and a second column called junk1 whose
datatype is
DATE.
I agree that it would be beneficial for the program
to at least alert
that a view contains two columns with the same name, if it
did not
prevent it.
Why don't you suggest that to RDCC?
Randy Peterson
----- Original Message -----
From: "Ramsour Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 9:22 AM
Subject: Duplicate column names in views
> Good morning:
>
> Quite by accident I discovered that I had a view that had
been inadvertently
> defined with duplicate column names. The data in the
columns (both named
> GAUGE) was coming from two different tables. This lead to
some confusion
> when a user tried to query the view with criteria against
the GAUGE column.
> Which GAUGE column was being referenced?
> As an aside, should R:Base allow such a thing to happen or
should there be
> some kind of check for this? Just curious.
>
> Hope this helps someone.
>
> Thanks
> Mike Ramsour
> Voice: 740-829-4340
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/