Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel and DB2 select with AS

Status
Not open for further replies.

mcauliff

Programmer
Feb 26, 2007
71
US
Is it possible to code an db2 select in the Microsoft Query function of Excel with the AS clause?

Example

Select last_name || ',' || first_name AS Name, address
from address
where last_name = 'Jones'

Does the 'AS Name' work in Excel?
 


Hi,

MS Query (not Excel) does not like alias names when you code SQL from DB2 or Oracle.

You can, however, use ADODB and VBA to query using aliases. Please post in forum707, if you want some help in that direction.

BTW, you can always assign MS Query, Data Range Properties to NOT return field headings and assign them yourself.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip

Thanks for the reply. I thought that it didn't allow for it. I wanted to make sure. This is suppose to be a onetime thing.

I keep in mind using VBA for future reference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top