excel 2003 database fields - is it possible to change the name

47 Views Asked by At

I am using excel 2003 query to pull information from databases and fields, I would like to rename the field headers but every time I refresh the data it defaults back to the original example

the field name is stit_ref which I want to change to req reference; if I do a refresh it just goes back to stit_ref after editing the cell/refreshing.

Is there a way to keep the edited field names. I attempted to do it via Microsoft Query by editing the Column heading but I get a syntax error.

2

There are 2 best solutions below

0
basic On

In MS Query you can write custom query and use aliases for selected fields:

SELECT stit_ref AS [req reference] FROM table
0
jkpieterse On

In the query definition it should say something like:

SELECT -other fields go here-,stit_ref FROM TableName

change that to:

SELECT -other fields go here-,stit_ref As [req referenc] FROM TableName