Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default How do you rename table headers in a query using Offic 07?

In older versions you could use AS after the field name and replace the name,
now that doesn't work. Example would be select dwdata.lstnme AS "Last".
With this in the query it would bring back a column heading of Last instead
of lstnme.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default How do you rename table headers in a query using Offic 07?

I think you need to wrap the alias in single quotes

"DFoster" wrote:

In older versions you could use AS after the field name and replace the name,
now that doesn't work. Example would be select dwdata.lstnme AS "Last".
With this in the query it would bring back a column heading of Last instead
of lstnme.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default How do you rename table headers in a query using Offic 07?

It doesn't recognize the AS command anymore

"Duke Carey" wrote:

I think you need to wrap the alias in single quotes

"DFoster" wrote:

In older versions you could use AS after the field name and replace the name,
now that doesn't work. Example would be select dwdata.lstnme AS "Last".
With this in the query it would bring back a column heading of Last instead
of lstnme.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default How do you rename table headers in a query using Offic 07?

Are you using MS Query?


I just did this in MS Query with Excel 2007, using this SQL

SELECT Activity.LocationSize, Activity.Function AS 'Fnctn',
Activity.ActivityCount
FROM Activity Activity, location location
WHERE Activity.LocationSize = location.Lbound AND Activity.LocationSize <=
location.Ubound

It returns the data to Excel with the 2d column's heading being 'Fnctn' -
it unfortunately includes the single quotes in Excel



"DFoster" wrote:

It doesn't recognize the AS command anymore

"Duke Carey" wrote:

I think you need to wrap the alias in single quotes

"DFoster" wrote:

In older versions you could use AS after the field name and replace the name,
now that doesn't work. Example would be select dwdata.lstnme AS "Last".
With this in the query it would bring back a column heading of Last instead
of lstnme.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to rename table columns in excel from a query DFoster Excel Worksheet Functions 3 August 26th 08 10:24 PM
rename groups in Pivot table Kermit Excel Discussion (Misc queries) 1 July 8th 08 08:50 AM
MS Query - Rename Column Dan Excel Discussion (Misc queries) 0 November 26th 07 10:11 PM
MS Query Rename Column Dan Excel Discussion (Misc queries) 0 November 26th 07 10:04 PM
how can I install the offic assistant to my system msstitchess Excel Worksheet Functions 1 June 24th 06 04:45 PM


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"