Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Western part of Georgia, USA
    Posts
    123

    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));

  2. #2
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •