Ver Mensaje Individual
  #14 (permalink)  
Antiguo 25/09/2008, 12:52
Ruisu
 
Fecha de Ingreso: agosto-2008
Mensajes: 10
Antigüedad: 15 años, 9 meses
Puntos: 0
Respuesta: Ayuda para parametrizar un OPENQUERY

Logré ponerle doble comillas... pero me genero otro error, debe ser por el limite de la cadena...

SELECT * FROM OPENQUERY(CURRENTWMS, 'SELECT BPD_WFNAME AS [USUARIO], BCH_NROCNT AS [CONTENEDORA], BCH_CODLOC AS [LOCAL], BPD_WFCASE AS [CAJAS], BCH_FECENT AS [FECHA] FROM FILELIB.BWPRDDIA T1 INNER JOIN FILELIB.BWCNTH01 T2 ON BPD_NROASI=BCH_NROASG AND BPD_WFASID=DIGITS(DECIMAL(BCH_CODLOC, 5, 0)) AND T1.CODFAC=T2.CODFAC AND T1.CODWHS=T2.CODWHS AND T1.WFACTD+19000000=T2.FECCRE AND DIGITS(BCH_NROCNT) IN ( ''101000873999'',''102000931450'',''101000878195'' ,''101000878195'',''102000931141'',''102000930244' ',''102000931141'',''102000931141'',''101000877247 '',''101000868541'',''102000932059'',''10100087649 1'',''101000876323'',''101000876326'',''1020009302 43'',''102000932163'',''101000881805'',''102000932 163'',''102000932165'',''101000//1801'',''101000877748'',''101000880006'',''1010008 80006'',''101000877746'',''102000933398'',''102000 933267'',''101000881748'',''102000933267'',''10100 0879976'',''102000933267'',''101000880006'',''1010 00880006'',''101000879976'',''102000933268'',''102 000933266'',''107000810247'',''102000933265'',''10 2000932128'',''101000877904'',''102000928928'',''1 02000928928'',''102000933532'',''107000810246'','' 102000933532'',''107000810246'',''102000933532'',' '107000810540'',''107000810246'',''102000934188'', ''105000868711'',''101000873735'',''101000876260'' ,''102000933396'',''105000868711'',''102000933395' ',''105000868712'',''107000809886'',''105000868712 '',''107000810253'',''107000810506'',''10200093353 3'',''102000933533'',''107000807997'',''1010008829 77'',''102000933533'',''102000933533'',''107000809 063'',''102000933551'',''102000930753'',''10200093 3957'',''102000933551'',''101000877426'',''1010008 77426'',''102000933551'',''101000877432'',''107000 806241'',''101000864404'',''107000806240'',''10700 0806240'',''101000879210'',''101000862853'',''1050 00868194'',''107000806240'',''105000868195'',''107 000806240'',''105000868195'',''105000868199'',''10 7000810777'',''101000873275'',''101000878021'',''1 02000934666'',''105000867495'',''102000934668'','' 105000867795'',''102000933524'',''107000810508'',' '105000868622'',''105000867495'',''105000866994'', ''105000866995'',''102000933551'',''101000868061'' ,''105000867750'',''102000933554'',''102000933554' ',''101000871900'',''102000931235'',''105000867751 '',''101000871900'',''101000871900'',''10100087190 1'',''105000867495'',''101000874220'',''1020009330 89'',''102000933089'',''101000874220'',''107000810 508'',''105000867495'',''000000000 '',''101000874220'',''101000874220'',''10100087838 4'',''00000000000 '',''102000932621'',''102000933740'',''10500086749 5'',''101000878384'',''101000878384'',''1020009337 46'',''102000933746'',''102000933271'',''102000933 273'',''102000933760'',''102000930664'',''10200093 0664'',''107000807604'',''102000934825'',''1070008 09098'',''102000934827'',''102000934744'',''102000 932791'',''105000868725'',''105000868725'',''10700 0812785'',''876202 '',''876711 '',''107000812790'',''877359 '',''877359 '',''877861 '',''877863 '',''102000933828'',''102000930930'',''10200093382 8'',''102000934961'',''102000933828'',''1020009349 60'',''102000932652'',''102000932652'',''102000932 652'',''101000879959'',''102000934062'',''10200934 414 .... (etc)
Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'MSDASQL'.
[OLE/DB provider returned message: [IBM][Controlador ODBC de iSeries Access][DB2 UDB]SQL0104 - Símbolo [ no válido. Símbolos válidos: <IDENTIFIER>.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' ICommandPrepare::Prepare returned 0x80040e14].

es eso cierto?