MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2014

Re: getting error on create view



fixed

I think I got it!

When you put your cursor on the message and pressed F1 - you DID do that, right? What is the explanatory text - 2nd-level text?

I took a guess and went to the docs to find out about column lists. According to the docs -

"You must specify a list of column names if the result table of the subselect has duplicate column names"

The column names normally inherit the names from the result table, unless there are certain issues. You have one of those - the one I cited.

The qualified names are not used in the view - so they don't make the names unique.

You have T01.IHDOCD and T02.IHDOCD -- those need to be given distinct names in the view.

HTH
Vern

On 4/8/2014 11:26 AM, Hoteltravelfundotcom wrote:
All removed but same error


On Tue, Apr 8, 2014 at 12:18 PM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:

try without the ALL

Jeff Young
Sr. Programmer Analyst


On Tue, Apr 8, 2014 at 12:16 PM, Hoteltravelfundotcom <
hoteltravelfun@xxxxxxxxx> wrote:

Am getting error, 'Column List required'. When i run this plainly for
viewing in SQL it is fine.

create view mklib.CUST5000A AS SELECT
ALL T01.IHDOCD, T01.IHENT#, T01.IHSFX#, T01.IHINV#,
T01.ADINTA,
T02.IHRIDC, T02.IHCOM#, T02.IHIDC#, T02.IHENT#,
T02.IHSFX#,
T02.IHINV#, T02.IHDOCT, T02.IHORD#, T02.IHREL#,
T02.IHORDT,
T02.IHFL50, T02.IHDOCD, T02.IHFL51, T02.IHORDD

FROM mklib.CUST5000 T01 INNER JOIN
ASTDTA.OEINHDIH T02
ON T01.IHENT# = T02.IHENT#

WHERE IHORDT IN ('COR', 'COE')
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact