Hello
I've been searching on the web all morning and can't find a solution to my problem.
I've got an Excel spreadsheet which imports external data from the iSeries via ODBC.
I have specified some calculated fields in my query to which I'm trying to assign meaningful column headings.
If I run my SQL statement on the iSeries, I do not need to put quotes around the alias, I use:
SELECT SUBSTR(FIELD1,1,2) AS ALIAS, ... etc
However, in the MS Query SQL window, it only accepts it if I put both single and double quotes around the alias! I've tried it without quotes and with single quotes and I get SQL0104 Token not valid....
SELECT SUBSTR(FIELD1,1,2) AS '"ALIAS"', ... etc
Then, each time you run the query, it adds another set of double quotes so you end up with stupid column headings like:
"""""""""""""ALIAS"""""""""""""""" on the resulting spreadsheet.
What on earth is going on?
Help gratefully appreciated...
I've been searching on the web all morning and can't find a solution to my problem.
I've got an Excel spreadsheet which imports external data from the iSeries via ODBC.
I have specified some calculated fields in my query to which I'm trying to assign meaningful column headings.
If I run my SQL statement on the iSeries, I do not need to put quotes around the alias, I use:
SELECT SUBSTR(FIELD1,1,2) AS ALIAS, ... etc
However, in the MS Query SQL window, it only accepts it if I put both single and double quotes around the alias! I've tried it without quotes and with single quotes and I get SQL0104 Token not valid....
SELECT SUBSTR(FIELD1,1,2) AS '"ALIAS"', ... etc
Then, each time you run the query, it adds another set of double quotes so you end up with stupid column headings like:
"""""""""""""ALIAS"""""""""""""""" on the resulting spreadsheet.
What on earth is going on?
Help gratefully appreciated...