Respuesta: Ayuda para parametrizar un OPENQUERY mmmh.. me salio este error, pero no capto que significa:
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 ( '102000972744','105000870481','105000877178','1050 00877178','105000877178','105000877178','105000877 178','105000877178','107000844485','101000957288', '101000957289','101000858731','101000957388','1010 00958056','101000957289','101000851546','102000970 789','102000972917','102000972917','102000972917', '102000973907','101000957194','101000957194','1020 00972917','102000972917','102000972917','102000972 917','107000842613','107000844287','102000972917', '102000972917','107000842613','102000972917','1070 00841532','102000972917','107000844995','102000970 992','101000959331','107000845887','102000972918', '101000959331','102000972918','107000845887','1020 00972918','107000846908','102000972918','102000972 918','105000877235','102000972918','105000878422', '107000770213','105000879270','105000878423','1020 00972918','107000770217','105000878424','102000972 918','107000775023','105000887926','105000878425', '105000878425','105000879267','105000879088','1050 00879267','105000879088','105000879093','105000879 266','107000839528','105000879094','102000972815', '102000972815','105000878439','105000879094','1070 00839528','10700846261 ','102000972918','105000879094','107000846262','10 7000839940','105000879265','105000879094','1070008 46305','107000840636','102000972918','105000879096 ','105000879098','102000972918','107000839451','10 5000877544','105000879098','102000972918','1020009 71700','102000971700','102000971700','105000877544 ','102000972265','105000878215','102000972918','10 5000879099','102000972918','105000879099','1020009 72288','102000972288','105000878217','102000972918 ','105000878357','102000972918','105000877539','10 2000972918','105000877541','105000877178','1050008 77542','102000972918','105000877542','105000877542 ','102000972918','105000877543','105000877178','10 5000877178','105000877178','105000877178','1050008 77959','105000877178','105000877959','105000878835 ','105000877178','105000877178','102100009721','10 5000877178','105000877179','102000871672','1020008 71672','105000877179','102000971672','105000877179 ','102000871673','102000871673','105000877181','10 2000971674','105000877179','102000971675','1020009 71675','105000877179','105000877179','105000877179 ','102000974596','105000877179','102000974596','10 2000972756','105000877179','105000877179','1020009 74597','105000877179','105000877179','102000974597 ','102000972756','105000877179','105000877181','10 2000974597','105000877181','105000877179','846181 ','105000877426','102000974718','846181 ','102000974718','846181 ','102000974718','840224 ','102000974717','101000957973','101000957973','83 7763 ','101000958372','837763 ','101000958379','837763 ','102000971195','837763 ','102000973271','845471 ','102000972583','102000971196','837763 ','101000958127','102000971196','102000972808','10 200097356 ','102000969926','878697 ','102000971403','878698 ','102000972069','954535 ','954534 ','954534 ','878700 ','955974 ','101000963714','955974 ','955974 ','955974 ','102000974313','101000958577','878925 ','958335 ','101000958577','102000974313','958335 ','102000974313','101000960302','950452 ','101000960317','878700 ','958728 ','101000953531','950449 ','101000958577','101000960317','958736 ','101000960317','101000958577','101000960316','10 1000960316','101000958577','101000955979','1010009 58577','107000846980','101000955979','101000958577 ','102000973692','101000958577','107000845465','10 1000955979','101000958577','101000955979','1070008 46980','101000955979','102000973759','101000955979 ','107000846980','101000960304','102000973782','10 1000960304','107000844629','101000955979','1020009 73783','101000960318','101000960435','101000960318 ','101000960306','101000960306','101000960309','10 1000960312','107000841430','105000878973','1050008 78972','105000878970','105000878332','102000973904 ','102000973900','102000973884','102000973883','10 2000973194','102000974560','102000973194','1020009 71992','102000971932','102000974561','102000973536 ','102000972631','102000972631','102000972631','10 1000952185','102000973122','102000974559','1020009 71932','102000973122','102000974575','102000973190 ','102000974059','102000969698','002000974559','10 2000969698','969627 ','102000969698','102000974559','102000969698','95 8743 ','102000969698','102000969698','958741 ','102000970947','102000970947','102000972672','10 2000970947','102000970947','102000970947','1020009 72672','102000971643','102000971433','101000960930 ','101000960930','102000972350','101000960982','10 1000960982','105000878662','102000974576','1050008 78662','102000972353','105000878661','102000974053 ','105000878662','102000974225','105000878665','10 5000878666','102000973777','102000974053','1050005 79039','101000961363','105000879028','105000879037 ','102000971348','102000971348','105000879031','10 200073742 ','101000951107','105000879033','105000879033','10 5000879033','105000879275','101000962323','1010009 62323','102000971764','105000879029','102000971764 ','105000875812','102000973741','102000973741','10 5000879275','105000879029','102000972538','1050008 79275','105000879032','102000971764','960128 ','105000879275','101000962648','102000971764','96 0128 ','105000879280','101000962314','102000972555','96 0128 ','101000962639','102000972554','960880 ','105000879276','102000972553','962561 ','105000875112','101000952572','105000879278','10 5000879278','105000879276','105000879276','1050008 75812','102000974791','102000973323','101000962378 ','101000962378','101000956656','101000956660','10 5000875812','102000972606','102000973204','1020009 74990','105000875812','958731 ','957089 ','105000875812','957089 ','957089 ','958734 ','102000974792','958734 ','102000974793','102000974793','102000974795','10 2000974795','102000974789','102000974791','1050008 78518','102000972401','102000971738','102000972866 ','101000958964','105000878996','107000844418','10 5000878996','101000957106','101000961768','1010009 53530','101000958860','101000958860','105000878997 ','101000958048','101000958048','101000960068','10 5000878999','102000974835','101000961818','1010009 61825','101000961825','105000879000','102000973732 ','102000973732','102000973732','101000962722','87 9260 ','101000962722','102000974588','102000974588','10 5000879002','102000973734','102000973734','1020009 73734','101000957269','101000957269','879260 ','879260 ','105000879003','879260 ','879260 ','105000879004','879260 ','105000879004','879260 ','105000879004','879260 ','879260 ','105000879004','107000843960','879260 ','105000879004','879260 ','879260 ','879260 ','105000879004','101000959979','879260 ','879260 ','102000973180','879260 ','102000973180','879260 ','102000974633','879260 ','102000973586','879260 ','102000974062','879260 ','101000963215','102000974633','879260 ','102000973586','879260 ','102000973586','879260 ','879260 ','102000973590','879260 ','879260 ','102000973588','101000961029','879260 ','102000974313','101000961029','879260 ','102000973589','101000961029','879260 ','102000971733','879260 ','102000973588','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','879260 ','105000879081','105000879081','879261 ','879263 ','105000879081','105000879081','105000879081','10 2000973182','105000879081','974666
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '102000972744'.
Server: Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark before the character string ') '. |