Re: Dumb SQL Question
Posted in 1995
Tammi asks:
> > I am writing an ace report & there are two table with fields that have the
> > same
> > name, How do I print both fields? Below is an example of my code:
> > [...]
> > Thanks in advance for you help.
> >
Clem responds:
>
> You can avoid this ambiguity by including a table name with
> the column name, as shown in the following example:
> SELECT mytab.count FROM mytab>
With all due respect, I don't think he answered the question I heard.
She wants to PRINT the two fields having the same name. I don't have
the manual handy, but I think it's done generally like this:
select
samename.table1,
samename.table2 samename2
from
table1,
table2
[...]
format
print samename samename2
I believe samename2 is referred to as an alias.
Good luck, Tammi.
--
Dan Madvig e-mail: d-madvig@bethel.edu
Bethel College & Seminary phone: (612) 638-6414
3900 Bethel Drive fax: (612) 638-6001
St. Paul, MN 55112
If it weren't for my ignorance,
Your brilliance would be of no use.