Microsoft Query in Excel 2002

  • Thread starter Thread starter steveross
  • Start date Start date
S

steveross

I have a simple sql query that picks up data from an external source via
ODBC and reads it into an Excel worksheet.

There are a number of columns that I need to rename before returning
the data to the Excel worksheet.

So the query I have written has the format:-

select col1 as "name", col2 as "address 1", col3 as "post code"
from table ztable


When the query runs none of the columns have the new names, also if I
edit the query after running all the as "xxx" have disappeared.

Has anyone any ideas? :confused:
 
Instead of double quotes, try square brackets (or perhaps single quotes?) e.g.

select
col1 as [name],
col2 as [address 1],
col3 as [post code]
from
ztable
 
I had previously tried the single quote which did not work.

I have now tried the [], which also failed to work
 
Back
Top