Changing Field Name

G

Guest

I am populating an Excel data table from an Oracle db over an ODBC
connection. I would like to change the field names via the SQL in Microsoft
Query. All of the following return errors:
SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS COMPANY

SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS "COMPANY"

SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS 'COMPANY'

ERROR: ORA-00923: FROM Keyword not found where expected
Any suggestions??? Thanks in advance!!!
 
W

Wendell A. Clark

Perhaps if you set an alias in your query [select statement] then reported
off of the alias

--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.
 
G

Guest

Hmm. Sounds great in theory. Being a newbie at this, I'm not sure how to
proceed at setting the alias.

Wendell A. Clark said:
Perhaps if you set an alias in your query [select statement] then reported
off of the alias

--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.


CinqueTerra said:
I am populating an Excel data table from an Oracle db over an ODBC
connection. I would like to change the field names via the SQL in
Microsoft
Query. All of the following return errors:
SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS COMPANY

SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS "COMPANY"

SELECT AP_INV_JE_LINE_DETAILS."ACCT$COMPANY" AS 'COMPANY'

ERROR: ORA-00923: FROM Keyword not found where expected
Any suggestions??? Thanks in advance!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top