Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!feedwest.aleron.net!aleron.net!sfo2-feed1.news.algx.net!allegiance!news-hog.berkeley.edu!ucberkeley!newsfeed.stanford.edu!postnews1.google.com!not-for-mail
From: kyfung@hotmail.com (K.Y. Fung)
Newsgroups: comp.databases.theory
Subject: Re: Column name in view
Date: 10 Nov 2002 18:12:51 -0800
Organization: http://groups.google.com/
Lines: 29
Message-ID: <c22bb40d.0211101812.532d83c6@posting.google.com>
References: <c22bb40d.0211090647.7ff57277@posting.google.com> <c0d87ec0.0211091607.2d38b63f@posting.google.com> <v7qz9.3251$h%5.119291@newsb.telia.net>
NNTP-Posting-Host: 202.40.157.165
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1036980772 8276 127.0.0.1 (11 Nov 2002 02:12:52 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 11 Nov 2002 02:12:52 GMT
Xref: newsfeed1.easynews.com comp.databases.theory:23511
X-Received-Date: Sun, 10 Nov 2002 19:12:37 MST (news.easynews.com)

"Tibor Karaszi" <tibor_not_pressed_ham_.karaszi@cornerstone.se> wrote in message news:<v7qz9.3251$h%5.119291@newsb.telia.net>...
> "--CELKO--" <71062.1056@compuserve.com> wrote in message
> news:c0d87ec0.0211091607.2d38b63f@posting.google.com...

> Another possibility is that K.Y. is using some query tool which tries to
> "help" by using some meta-data and exposes "where the data comes from" with
> the column names.

CELKO solution works, and for your reference the SQL I used, I think,
is a study verions package. It is called InfoMaker SQL Anywhere which
is using the SQL:1989 specification.

By the way through some trial and error I found another way that
works, it was by putting a () to enclose the column name as follows:

SELECT (a.studend_id) AS "ID", (a.student_name) AS "Name",
(b.course_study) AS "Study"
FROM view1 a, view2 b
WHERE a.student_id = b.student_id

May be different SQL implementation has different syntax to do the
same thing. In this case may be SQL Anywhere treats () as a special
function that "un-help" by "hiding where the data comes from" and
remove the "view1 view2" from the heading.

???

Regards,
King Yin Fung
