Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming columns in MS Query
I use several MS Queries to import into Excel '03 workbooks via ODBC from our
corporate mainframe (linked Access tables). I would like to rename the column headings in the query design before returning the results to Excel. However, despite the options to do so, I keep getting error messages about a 'missing expected lexical'. I even tried editing the SQL statement but got the same results. What's the trick to make MS Query rename the columns? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming columns in MS Query
At a guess, you're trying to use column names that have spaces. Enclose
those names within a pair of single quotes. select lname as 'Last Name' from somedatabase "RhysPieces" wrote: I use several MS Queries to import into Excel '03 workbooks via ODBC from our corporate mainframe (linked Access tables). I would like to rename the column headings in the query design before returning the results to Excel. However, despite the options to do so, I keep getting error messages about a 'missing expected lexical'. I even tried editing the SQL statement but got the same results. What's the trick to make MS Query rename the columns? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Renaming columns in MS Query
This is an example of what I have : UnitofMeasure. What I want is UOM. There
are about 6 other columns but this is simply an example. If I can fix this one the rest will be easy. When using the suggestion below I get the error code: 'unexpected lexical element missing:<identifier'. Please tell me what this means and a work-around. Thanks again. "Duke Carey" wrote: At a guess, you're trying to use column names that have spaces. Enclose those names within a pair of single quotes. select lname as 'Last Name' from somedatabase "RhysPieces" wrote: I use several MS Queries to import into Excel '03 workbooks via ODBC from our corporate mainframe (linked Access tables). I would like to rename the column headings in the query design before returning the results to Excel. However, despite the options to do so, I keep getting error messages about a 'missing expected lexical'. I even tried editing the SQL statement but got the same results. What's the trick to make MS Query rename the columns? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Database Query... can't see columns | Excel Discussion (Misc queries) | |||
Renaming Columns | Excel Discussion (Misc queries) | |||
renaming columns | Excel Discussion (Misc queries) | |||
Renaming Access Query used by Excel | Excel Discussion (Misc queries) | |||
Excel, renaming columns | Excel Worksheet Functions |