View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jeff[_3_] Jeff[_3_] is offline
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!