2revup
Posting Yak Master
112 Posts |
Posted - 2013-11-12 : 01:56:52
|
Guys I am developing a job that will copy data from MySQl to MSSQL, I have a few of them that are working well, but this one has me stumped as its not finding any data, yet when I query the table there is new data there when I refer to the dates there is a few hundred rows.here is what the query looks like:insert into [tempTest]select * from openquery([support_cases],'Select o.comm_id, parent_comm_id, cc.case_id, owner_agent_login, owning_agent_login_id, creating_agent_login_id, resolver, comm_type_code, is_active, is_Customer_sender,email_queue_name,primary_email_id, comm_subject, case_description, Merchant_id, alt_merchant_name,response_sla_minutes, severity, TTR_Days, case_status_name, reason, category_name, case_type_name,case_item_name,comm_date_utc,o.creation_date as comm_creation, creation_date_utc, case_start_date_utc, o.last_updated_date as comm_last_updated, cd.last_updated, case_resolve_date_utc, last_inbound_date_utc,last_outbound_date_utc, first_outbound_date_utc FROM o_communications ojoin o_case_communications as cc on o.COMM_ID=cc.COMM_IDleft join d_case_details cd on cc.case_id=cd.case_idwhere comm_date_utc >= DATE_SUB(CURRENT_DATE(), INTERVAL 15 DAY) and is_Customer_sender = ''Y''and (cd.email_queue_name like ''support%'' or cd.email_queue_name like ''acme%'') and cd.email_queue_name not like ''%-cs%'' and cd.email_queue_name not like ''%test%'' and cd.email_queue_name not like ''%trms%''limit 6000000;')twhere not exists (select 1 from [tempTest] where comm_id = t.o.comm_id )goI have tried cutting out many of the and clauses, but this is not the problem, as they seem to fit the bill when manually going through the data.Any clues as to what this could be? |
|