Full Version: <DATE> field name in Pass-Through
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
jjturner
Is there any way to pull in a field named "DATE" from an Oracle db in a pass-throught query ?

I know - no one should use that as field name, but unfortunately I don't own the Oracle db

The error is: [Oracle][ODBC][Ora] . . .: missing expression (#936)

TIA,
John
Troulcortex
I am assuming you've tried aliasing it...

Select Date AS dtmDate
jjturner
correct
Troulcortex
The pass-through is executed by Oracle itself - that is why the error you are getting has the [Oracle][ODBC]- this tells me that 'Date' is probably reserved in Oracle itself...


Oracle reserved words

...

I know I'm not helping much, but I am a little curious on how your Oracle DBA managed to name a field 'Date'....

G
Troulcortex
Can you share the SQL of your pass-through?
jjturner
believe me when I tell you this was a total amateur job on the Oracle side (either that, or they just wanted to stick it to someone) - - I was shocked when I first started linking in the tables

Your list actually helps a bit, since all I was working with was the Access reserved words list . .

Normally, I'd just link tables, but the darned table has 255+ fields !!! How do you like that?

So naturally, DATE is beyond the initial 255 - - which is why I'm trying to use a pass-thru to get to the remaining fields (I was given a complete field list for reference - all 433 of them)
jjturner
It's just bare basic:

SELECT ACC2,ACCT,ACT2,ADDR,AKPS,AMBY,AMSL,AMTT,AMTV,ANKY,ARCB,ARCP,ASD1,ASD2,ASI2,ASID,
ASIT,DATE, (etc.)
FROM ZHIST
Troulcortex
Wow man - I'm at a loss here... If it is reserved in both Oracle and Access, I don't see how you could do it...

That really [censored] about >255 fields...

I've been in my fair share of pickles but this one takes the brine...

I have one more buddy I can ask - I'll get back to you tomorrow if I find out anything.


Good luck...

Gabe
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.