Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default MS Query Oracle syntax

Does anyone know syntax for renaming a field using MS Query with a
oracle databse?

select f1 "MyField" from mytable; returns an error


actually more correctly stated my query is something like
select myfunction(f1, f2, f3) "MyName" from table1 where f1 = 1;


Thanks for pointing me in the right direction.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default MS Query Oracle syntax

If I understand correctly, you want to obtain data from the Oracle database
in a column with some name, but you want it returned as another name? That
is an "alias" in Oracle SQL. I think your first example is pretty much what
you want, but you do not want to enclose the alias name within double quote
marks although I've seen examples showing it that way (bad examples).

Select f1 MyField From MyTable WHERE f1 = 1;
will work, I believe. To be honest, last time I worked with Oracle was back
with 8 was top of the pile, they're up to what? 10? 12? now. A search for
Oracle Alias should help more.

"Jeff" wrote:

Does anyone know syntax for renaming a field using MS Query with a
oracle databse?

select f1 "MyField" from mytable; returns an error


actually more correctly stated my query is something like
select myfunction(f1, f2, f3) "MyName" from table1 where f1 = 1;


Thanks for pointing me in the right direction.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default MS Query Oracle syntax

On May 11, 4:47 pm, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
If I understand correctly, you want to obtain data from the Oracle database
in a column with some name, but you want it returned as another name? That
is an "alias" in Oracle SQL. I think your first example is pretty much what
you want, but you do not want to enclose the alias name within double quote
marks although I've seen examples showing it that way (bad examples).

Select f1 MyField From MyTable WHERE f1 = 1;
will work, I believe. To be honest, last time I worked with Oracle was back
with 8 was top of the pile, they're up to what? 10? 12? now. A search for
Oracle Alias should help more.



"Jeff" wrote:
Does anyone know syntax for renaming a field using MS Query with a
oracle databse?


select f1 "MyField" from mytable; returns an error


actually more correctly stated my query is something like
select myfunction(f1, f2, f3) "MyName" from table1 where f1 = 1;


Thanks for pointing me in the right direction.- Hide quoted text -


- Show quoted text -


Thanks for response... I believe MS Query is the trouble maker (or
Oracle ODBC error?) in that I've tried it without quotes and it errors
out as well. Just not sure where to understand the MSQuery twist to
this. From Oracle or even a passthru query from Access I can get to
work but I'm having struggles with MS Query... Any further ideas?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default MS Query Oracle syntax

Sorry, no I don't. Hopefully someone with more experience with both MS Query
and interfacing with Oracle will help out. When I was interfacing with an
Oracle db, I was using Oracle Objects for OLE (OO4O) to extract data from the
Oracle db into Excel. Nice little freebee from Oracle that really worked
well.

"Jeff" wrote:

On May 11, 4:47 pm, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
If I understand correctly, you want to obtain data from the Oracle database
in a column with some name, but you want it returned as another name? That
is an "alias" in Oracle SQL. I think your first example is pretty much what
you want, but you do not want to enclose the alias name within double quote
marks although I've seen examples showing it that way (bad examples).

Select f1 MyField From MyTable WHERE f1 = 1;
will work, I believe. To be honest, last time I worked with Oracle was back
with 8 was top of the pile, they're up to what? 10? 12? now. A search for
Oracle Alias should help more.



"Jeff" wrote:
Does anyone know syntax for renaming a field using MS Query with a
oracle databse?


select f1 "MyField" from mytable; returns an error


actually more correctly stated my query is something like
select myfunction(f1, f2, f3) "MyName" from table1 where f1 = 1;


Thanks for pointing me in the right direction.- Hide quoted text -


- Show quoted text -


Thanks for response... I believe MS Query is the trouble maker (or
Oracle ODBC error?) in that I've tried it without quotes and it errors
out as well. Just not sure where to understand the MSQuery twist to
this. From Oracle or even a passthru query from Access I can get to
work but I'm having struggles with MS Query... Any further ideas?

Thanks!


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
Pivot Table, MS Query and Oracle Monika Excel Discussion (Misc queries) 2 March 29th 06 02:16 PM
How to update ORACLE query definition in Excel file Viks Links and Linking in Excel 0 January 6th 06 02:56 PM
Microsoft Query syntax Krish Excel Discussion (Misc queries) 0 October 7th 05 02:33 PM
MS Query - Alias syntax David P Excel Worksheet Functions 3 February 16th 05 09:29 AM
Previous Post - Correct Syntax Query Clarence Crow Excel Worksheet Functions 0 December 7th 04 05:35 AM


All times are GMT +1. The time now is 01:28 AM.

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

About Us

"It's about Microsoft Excel"