Jun 4, 2009 #1 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?
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?
Jun 4, 2009 #2 S SkipVought Programmer Dec 4, 2001 47,492 US 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, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
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, Just traded in my old subtlety... for a NUANCE!
Jun 4, 2009 Thread starter #3 mcauliff Programmer Feb 26, 2007 71 US 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. Upvote 0 Downvote
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.