• newbieuser (5/10/2011)


    Hi all,

    We get the below error when using order by clause in the select query using the linked server to Oracle table (LS..USER2.UNIT3)

    SELECT U.ABO,U.LED_ID, U.PROJECT_NO, T.WORDC, P.CHECKC, P.PIN_NO,

    FROM unit1 U, unit2 L, LS..USER2.UNIT3 P, unit4 T

    WHERE

    U.ABO like 'LE%'

    AND U.CREATE_DT = '18/01/2009'

    AND U.ABO = L.ABO

    AND L.CT_ID = P.CT_ID AND U.PCT = T.ACT AND U.FJT_TYP = T.FJT_TYP

    ORDER BY U.ABO, U.LED_ID

    Error:

    OLE DB provider "ORAOLEDB.ORACLE" for linked server "ls" 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 "ls".

    But the query is successful if we comment out the order by clause & also if we remove the U.CREATE_DT condition in the where clause..

    I'm not sure what we are missing.. Please help.

    Thanks

    Would the solution of inserting the Oracle data into a temp table, then joining the temp table, work for you, as suggested (by someone much smarter about SQL Server than me) to solve a similar problem here:

    http://www.sqlservercentral.com/Forums/Topic538856-149-1.aspx#bm539530

    Jason Wolfkill