Reputation: 53
I am trying to fetch and insert the data from one table to another on a linked server.
with datum as
(
select * from openquery([DDL_64],'SELECT e.*
, ib.sales_order_number IB_SALES_ORDER_NUMBER
, ib.sales_order_date IB_SALES_ORDER_DATE
, ib.sales_order_type IB_SALES_ORDER_TYPE
, ib.model_number IB_MODEL_NUMBER
, ib.product_item_number IB_ITEM_NUMBER
, ib.product_item_description IB_MODEL_DESC
, ib.install_base_status IB_STATUS
, ib.cs_customer_name IB_Install_Customer
, ib.install_at_country_name IB_Install_Country
, ib.model_so_line_num IB_Model_SO_Line_Number
, current_date last_Run_Date
FROM ws_sls_core.dd_enclosures_forarsdashboard e
left join ws_sls_core.w_customer_ib_profile ib
ON (e.encl_serial = ib.serial_number and ib.model_number not in (''NA'',''UN'')) limit 10')
)
insert into openquery([DDL_64],'select sn1,encl,encl_model,encl_serial,encl_slots,encl_state,encl_oem_name,encl_owm_value,parsed_ts,disk,disk_slot,disk_manf,disk_capacity,disk_sn,disk_type,disk_firmware,disk_model,id,asupid,sn,epoch,external,model,model_str,sn_valid,eth0mac,tz,lic_feature,lic_key,ib_sales_order_number,ib_sales_order_date,ib_sales_order_type,ib_model_number,ib_item_number,ib_model_desc,ib_status,ib_install_customer,ib_install_country,ib_model_so_line_number,last_run_date
from ws_sls_core.dd_enclosure_ib_f_temp ')
select * from datum
I am getting the error:
OLE DB provider "MSDASQL" for linked server "DDL_64" returned message "the driver cound't identify inserted rows". Msg 7343, Level 16, State 2, Line 1 The OLE DB provider "MSDASQL" for linked server "DDL_64" could not INSERT INTO table "[MSDASQL]".
I have checked and am using the 64bit version of SSMS & ODBC setup. PS: Select statement is working fine. I have limited it to 10 rows for testing purposes. Any input is appreciated. Thank you!
Upvotes: 0
Views: 268