Trouble with SQL code -- Linked Server?

  • I am having trouble with some SQL code. If I run the following code, I get these errors:

    OLE DB provider "OraOLEDB.Oracle" for linked server "AWL_Oracle" returned message "ORA-01403: no data found".

    Msg 7346, Level 16, State 2, Line 1

    Cannot get the data of the row from the OLE DB provider "OraOLEDB.Oracle" for linked server "AWL_Oracle".

    If I comment out the line "and a.APPLICATION_DT >= '2012-08-01T00:00:00.00'" the code works. The query does use a linked server (which is the "AWL_Oracle" referenced).

    Can someone please tell me what is happening here?

    ***********************************************

    select a.hid, a.APPLICATION_NO, a.application_dt, a.MOBILITY_IMPAIRED,

    hc.HID, hc.ManagingAgentID, hc.StudioCount

    from [OHO].[AWL].[APPLICATION] a,

    [OHO].[AWL].[HousingCompany] hc

    where a.hid = 'H047'

    and a.APPLICATION_DT >= '2012-08-01T00:00:00.00'

    and hc.HID = a.hid

    ***********************************************

    Thanks!

    Jon

  • Just a random thought: have you tried

    and a.APPLICATION_DT >= '2012-08-01 00:00:00.00'?

    Or

    and a.APPLICATION_DT >= '2012-08-01 T00:00:00.00'?

    The space is typically required as a delimiter.

  • They both return the same error message.

  • Does that query work through sqlplus?

  • jerry-621596 (10/30/2012)


    Just a random thought: have you tried

    and a.APPLICATION_DT >= '2012-08-01 00:00:00.00'?

    Or

    and a.APPLICATION_DT >= '2012-08-01 T00:00:00.00'?

    The space is typically required as a delimiter.

    Try a.APPLICATION_DT >= TO_DATE('20120801','YYYYMMDD')

    ---------------------------------------------------------------
    Mike Hahn - MCSomething someday:-)
    Right way to ask for help!!
    http://www.sqlservercentral.com/articles/Best+Practices/61537/
    I post so I can see my avatar :hehe:
    I want a personal webpage 😎
    I want to win the lotto 😀
    I want a gf like Tiffa :w00t: Oh wait I'm married!:-D

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply