07-18-08, 15:08 #1Registered User
- Join Date
- Oct 2002
- Western part of Georgia, USA
Unanswered: Linking Linked tables from Oracle and SQL
Thanks in advance for any help rendered! I using Access to house linked tables from both oracle and mssql. I am create a query that joins one table from oracle to a mssql table with date being part of the critera for the join. I am looking to return all rows from the Events table (line event data that is timestamped) which occur on the same date that the record from Workorder was completed. Here is what i have so far; it works until i do the dateadd then it fails for an oracle date format issue. Here is what i have so far
SELECT EVENTS.*, dbo_View_Workorder_MTBF.LineNum, dbo_View_Workorder_MTBF.Line, dbo_View_Workorder_MTBF.CompletionDate
FROM dbo_View_Workorder_MTBF INNER JOIN EVENTS ON (dbo_View_Workorder_MTBF.Line = EVENTS.PROCID) AND (dbo_View_Workorder_MTBF.CompletionDate > EVENTS.ENDTS AND dbo_View_Workorder_MTBF.CompletionDate < DATEADD('d', 1, EVENTS.ENDTS));
07-21-08, 14:29 #2Registered User
- Join Date
- May 2008
- Raleigh, NC
Oracle is funny in the way it compares dates. You might want to try first using a query from your Oracle table and formatting the date into the same format the other table uses. Then joing the query to the other table as before.
Good luck, Stu--If its free, take it for what its worth!