Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle ODBC Import of Date Range to SQL Server

Status
Not open for further replies.

PRaevsky

Programmer
Jun 2, 2006
1
US
What is the Syntax?
I can say "SELECT * FROM Invoices WHERE INVOICE_DATE > sysdate", but not INVOICE_DATE > sysdate - 1 (in any of its variations -- (sysdate-1), trunc(sysdate-1), trunc(sysdate)-1, etc.)

If using ODBC Access, I can say INVOICE_DATE > DATE()-180, but that syntax doesn't work with ODBC Oracle.

On a less positive note, is this beta software? The Import/Export wizard exports tables that cannot be re-imported. That's Microsoft SQL Server to Microsoft Access. Varchar(3)'s turn into Memos, and unless someone tells me differently, nothing will turn a Memo back into a Varchar(3).
 
I know this is an old post, but I thought I'd reply to it in case this was still an issue for someone.

When doing your T-SQL statement, you don't use trunc(xxxx), you use DateAdd(dd,-1,sysdate) to get your sysdate - 1.

BTW, Microsoft Access does not support the same datatypes as SQL Server. There is no Varchar() - or even char() - in MS Access. Just Text and Memo. Memo is the bigger field, so I'd change it to Text if I were you.

Hope this helps.


Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top