On Wed, 24 Sep 2008 11:02:28 +0200, "Mike Endys"
<MikeEndy (AT) nospam (DOT) nospam> wrote:
Quote:
I did it by AS keyword... SELECT GLMPUJ AS DocumentNumber FROM
tblSourceTable |
That is one of three ways to assign an alias to an output column.
SELECT GLMPUJ AS DocumentNumber
SELECT GLMPUJ DocumentNumber
SELECT AS DocumentNumber = GLMPUJ
As you see in the second example AS is optional. Of the three that is
the one I do not use. That format also provides the annoying behavior
that a comma between two column in a SELECT list results in the former
column receiving the later column's name as an alias. That can be
very confusing.
I think that I have heard that the third format using = is not
standard SQL, but I am not certain. It can be the cleanest to read if
you format your SELECT neatly, as it is always right there up front
even when the expression is long and complicated.
Roy Harvey
Beacon Falls, CT