January 22, 2015 at 11:12 am
The below cursor is running very slow and I am noticing a lot of PAGEIOLATCH_SH wait states. I have all the necessary indexes, but none the less it is slow as molasses.
I need to update 16 million records. what this cursor does is; looks for multiple contacts with the same email address, flags the repeat contacts with the original contact information. It then Flags the original contact as having repeat contacts. Looking at sample results, the program updates the data perfectly. Help will be much appreciated.
DECLARE @email varchar(120), @ir char(12), @OrigIR char(12), @Begin datetime, @End Datetime-- Some varriables
SET @email = ''
SET @ir = ''
SET@OrigIR = ''
DECLARE OrigContact CURSOR FOR
SELECT email, IRNumber-- Scope
FROM bo_rpt..CRMIRDEV
WHERE email is not null and statusProfile = 'ZINTREC' and rc is not null and invalid is null
OPEN OrigContact
FETCH NEXT FROM OrigContact INTO @email, @ir-- Populate variables with current record
WHILE @@FETCH_STATUS = 0
BEGIN
SET @OrigIR = (SELECT MAX(irnumber) from CRMIRDEV where email = @email AND StatusProfile = 'ZINTREC' and IRnumber < @ir and invalid is null and firstir is null and RC is null) -- Get the Original interaction number for this email address
UPDATE bo_rpt..CRMIRDEV-- Populate variables from current record
SET FirstIR = @OrigIR,
FirstChannel = ChannelDesc ,
FirstContactDate = IRDate,
FirstOrg = OrgDesc ,
FirstAgent = CreatedBy ,
FirstLOB = Cat1desc
WHERE irnumber = @ir
UPDATE bo_rpt..CRMIRDEV-- Flag Original IR to identify there is a repeat on it
SET HasRepeat = 1
WHERE IRnumber = @OrigIR
SET @OrigIR = ''--reset Variable
FETCH NEXT FROM OrigContact INTO @email, @ir
END
CLOSE OrigContact
DEALLOCATE OrigContact
January 22, 2015 at 11:50 am
I had a solution but it won't work on SQL 2000. Could you confirm the version you're working on?
January 22, 2015 at 11:52 am
Yes, It is SQL 2000 Server.
January 22, 2015 at 12:24 pm
Quick question, can you post the DDL and some sample data as an insert statement, makes it easier to help?
๐
January 22, 2015 at 12:55 pm
Lucky me, the job just completed after 41:22:03. Running it on the daily updates from this point on will be painless. Hopefully I will never have to do a historical again. I appreciate your efforts and certainly don't want to waste anyone's / more time on this. Thanks
January 22, 2015 at 12:58 pm
If you ever need to do it again. Wouldn't you would like to be prepared? The problem in here is the cursor going row by row instead of doing it all at once.
Providing DDL and sample data, will help you not only to have a code for this situation but to learn a faster alternative.
January 22, 2015 at 2:48 pm
Glad you insisted!
Attached is the structure and sample data. I have indexes on IRnumber(primary key), irdate, email, Statusprofile, RC, First IR and Invalid.
I have a process that runs daily to flag records where the customer has contacted us previously (within the past 30 days). That process updates the RC (Repeat Contact flag) and the DSLC (Days Since Last contact). This current process here, looks at those fields to determine which record is the initial contact (RC = NULL) and places some information from the original contact on the repeat contact. This is based upon email address and the IRDate.
Thanks a million.
January 22, 2015 at 4:07 pm
Could you post your sample data as insert statements? I tried to help you but I'm missing columns that you used in your query for which you didn't supply any data.
Here's an example:
DROP TABLE CRMIRDEV;
GO
CREATE TABLE CRMIRDEV(
[IRNumber] [varchar] (10) ,
[IRDate] [datetime] NULL ,
[Email] [varchar] (120) ,
[Channel] [varchar] (15) ,
[rc] [int] NULL ,
[dslc] [int] NULL ,
[HasRepeat] [char] (1) ,
[firstIR] [varchar] (10),
[FirstChannel] [varchar] (20) ,
[FirstContactDate] [datetime] NULL ,
[FirstOrg] [varchar] (12) ,
[FirstAgent] [varchar] (12),
[FirstLOB] [varchar] (25) ,
[Invalid] [int] NULL ,
[StatusProfile] [varchar] (12),
--[SRNumber] [varchar] (10) ,
[ChannelDesc] [varchar] (15) ,
[CreatedBy] [varchar] (12) ,
--[LastChangedBy] [varchar] (12) ,
--[ORG] [varchar] (8) ,
[ORGDesc] [varchar] (12) ,
--[OrgMediumdesc] [varchar] (40) ,
--[RespOrgDesc] [varchar] (30) ,
--[RespEmployee] [varchar] (10) ,
--[RespEmpLName] [varchar] (40) ,
--[RespEmpFName] [varchar] (40) ,
--[RespUserName] [varchar] (12) ,
--[RefDoc] [varchar] (20) ,
--[SerialNumber] [varchar] (16) ,
--[Cat1] [varchar] (10) ,
[Cat1Desc] [varchar] (50) ,
--[Cat2] [varchar] (10) ,
--[Cat2Desc] [varchar] (50) ,
--[Cat3] [varchar] (10) ,
--[Cat3Desc] [varchar] (50) ,
--[Resolution] [varchar] (10) ,
--[ResolutionDesc] [varchar] (50) ,
--[ContactPartner] [varchar] (10) ,
--[CustSurname] [varchar] (60) ,
--[CustFName] [varchar] (60) ,
--[CustLName] [varchar] (60) ,
--[Street] [varchar] (100) ,
--[City] [varchar] (60) ,
--[State] [varchar] (10) ,
--[Zip] [varchar] (10) ,
--[TelephoneNo] [varchar] (60) ,
--[TimeZone] [varchar] (6) ,
--[StoreID] [varchar] (10) ,
--[Counter] [int] NULL ,
--[Lastupdated] [datetime] NULL ,
--[TRDesc] [varchar] (100) ,
--[TranType] [varchar] (15) ,
)
SET DATEFORMAT dmy
INSERT INTO CRMIRDEV ([IRNumber], [IRDate], [Email],[Channel],[rc],[dslc],[HasRepeat],[firstIR],
[FirstChannel],[FirstContactDate],[FirstOrg],[FirstAgent],[FirstLOB],[Invalid])
SELECT '16322250','01/01/2015','adami.hughes@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '16322544','01/01/2015','adami.hughes@gmail.com','E-Mail','1','0',NULL,'16322250','E-Mail','01/01/2015','BNC_TEAM46','TTN_MSUGANOB','BN Products',NULL UNION ALL
SELECT '16322547','01/01/2015','adami.hughes@gmail.com','E-Mail','1','0',NULL,'16322250','E-Mail','01/01/2015',NULL,'TTN_ETEODOSI',NULL,NULL UNION ALL
SELECT '16333278','02/01/2015','adami.hughes@gmail.com','E-Mail','1','1',NULL,'16322250','E-Mail','02/01/2015','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL UNION ALL
SELECT '16333408','02/01/2015','adami.hughes@gmail.com','E-Mail','1','0',NULL,'16322250','E-Mail','02/01/2015',NULL,'TTN_MMADO',NULL,NULL UNION ALL
SELECT '16359754','03/01/2015','adami.hughes@gmail.com','E-Mail','1','1',NULL,'16322250','E-Mail','03/01/2015','BNC_TEAM2','WIL_PLUURS2','BN Products',NULL UNION ALL
SELECT '6854260','08/07/2013','asmith020@sc.rr.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '6854261','08/07/2013','asmith020@sc.rr.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '6869057','09/07/2013','asmith020@sc.rr.com','Telephone call','1','1',NULL,'6854260','Telephone call','09/07/2013','HHM_TEAM44','HHM_CJOBETH','NOOK 1st Gen (wi-fi/3G)',NULL UNION ALL
SELECT '7141009','24/07/2013','asmith020@sc.rr.com','Telephone call','1','15',NULL,'6854260','Telephone call','24/07/2013','ATX_TEAM7','ATX_KCASTRO',NULL,NULL UNION ALL
SELECT '11368478','12/02/2014','asmith020@sc.rr.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '11369553','12/02/2014','asmith020@sc.rr.com','Telephone call','1','0',NULL,'11368478','Telephone call','12/02/2014','BNC_TEAM9','TTN_LROCO',NULL,NULL UNION ALL
SELECT '11369692','12/02/2014','asmith020@sc.rr.com','Telephone call','1','0',NULL,'11368478','Telephone call','12/02/2014','BNC_TEAM50','TTN_CMASINDO',NULL,NULL UNION ALL
SELECT '11370286','12/02/2014','asmith020@sc.rr.com','Telephone call','1','0',NULL,'11368478','Telephone call','12/02/2014','BNC_TEAM9','TTN_LROCO',NULL,NULL UNION ALL
SELECT '11771856','07/03/2014','asmith020@sc.rr.com','Telephone call','1','23',NULL,'11368478','Telephone call','07/03/2014','HHM_TEAM34','HHM_BVALIENT',NULL,NULL UNION ALL
SELECT '11772394','07/03/2014','asmith020@sc.rr.com','Telephone call','1','0',NULL,'11368478','Telephone call','07/03/2014',NULL,'HHM_LDIAZ',NULL,NULL UNION ALL
SELECT '11916545','17/03/2014','asmith020@sc.rr.com','E-Mail','1','10',NULL,'11368478','E-Mail','17/03/2014','BNC_TEAM28','TTN_AANIVES','Downloadable Products',NULL UNION ALL
SELECT '11916546','17/03/2014','asmith020@sc.rr.com','E-Mail','1','0',NULL,'11368478','E-Mail','17/03/2014',NULL,'TTN_AANIVES',NULL,NULL UNION ALL
SELECT '11934738','18/03/2014','asmith020@sc.rr.com','Telephone call','1','1',NULL,'11368478','Telephone call','18/03/2014',NULL,'TTN_AANIVES',NULL,NULL UNION ALL
SELECT '11970531','20/03/2014','asmith020@sc.rr.com','Telephone call','1','2',NULL,'11368478','Telephone call','20/03/2014',NULL,'TTN_AANIVES',NULL,NULL UNION ALL
SELECT '12423801','17/04/2014','asmith020@sc.rr.com','E-Mail','1','28',NULL,'11368478','E-Mail','17/04/2014','BNC_TEAM4','TTN_DESTRADA',NULL,NULL UNION ALL
SELECT '12430202','18/04/2014','asmith020@sc.rr.com','E-Mail','1','1',NULL,'11368478','E-Mail','18/04/2014','BNC_TEAM50','TTN_RLLAVOR','Client Apps',NULL UNION ALL
SELECT '12866672','18/05/2014','asmith020@sc.rr.com','E-Mail','1','30',NULL,'11368478','E-Mail','18/05/2014','BNC_TEAM28','TTN_JZAMORA','Downloadable Products',NULL UNION ALL
SELECT '16322248','01/01/2015','asmith020@sc.rr.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '16595318','15/01/2015','asmith020@sc.rr.com','Chat','1','14',NULL,'16322248','Chat','15/01/2015',NULL,'TTN_JJUTARA',NULL,NULL UNION ALL
SELECT '16321979','01/01/2015','atdemartin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '16322221','01/01/2015','atdemartin@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1' UNION ALL
SELECT '16323032','01/01/2015','atdemartin@gmail.com','Telephone call','1','0',NULL,'16321979','Telephone call','01/01/2015',NULL,'TTN_AANIVES',NULL,NULL UNION ALL
SELECT '16322240','01/01/2015','azsunt@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL UNION ALL
SELECT '16334817','02/01/2015','azsunt@aol.com','E-Mail','1','1',NULL,'16322240','E-Mail','02/01/2015','ARV_TEAM1','WIL_PLUURS2','Samsung GT4-7',NULL
EDIT: Sorry, I posted code for SQL2008.
January 22, 2015 at 8:30 pm
Sorry about that, I provided the results instead of everything. Iv'e added the four missing fields on the attached.
January 22, 2015 at 11:19 pm
gconte 55278 (1/22/2015)
Sorry about that, I provided the results instead of everything. Iv'e added the four missing fields on the attached.
That's nice but please see the first link under "Helpful Articles" in my signature line below. It would be really helpful to us for you to post the data in such a readily consumable format so that we can test any solutions we might come up with. Thanks.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 23, 2015 at 12:32 pm
Thanks for the lesson, I'm new here.
IF OBJECT_ID('TempDB..#CRMIRTest','U') IS NOT NULL
DROP TABLE #CRMIRTest
CREATE TABLE [#CRMIRTest] (
[IRNumber] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL Primary Key,
[IRDate] [datetime] NULL ,
[Email] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ChannelDesc] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[rc] [int] NULL ,
[dslc] [int] NULL ,
[HasRepeat] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[firstIR] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstChannel] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstContactDate] [datetime] NULL ,
[FirstOrg] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstAgent] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstLOB] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Invalid] [int] NULL ,
[ORGDesc] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Cat1Desc] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[StatusProfile] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CreatedBy] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]
GO
CREATE INDEX irdate ON #CRMIRTest(IRDate)
CREATE INDEX email ON #CRMIRTest (email)
CREATE INDEX rc ON #CRMIRTest (rc)
CREATE INDEX HasRepeat ON #CRMIRTest (HasRepeat)
CREATE INDEX firstIR ON #CRMIRTest (firstIR)
CREATE INDEX Invalid ON #CRMIRTest (Invalid)
CREATE INDEX StatusProfile ON #CRMIRTest (StatusProfile)
INSERT INTO #CRMIRTest
(IRNumber, IRDate, Email, ChannelDesc, rc, dslc, HasRepeat, firstIR, FirstChannel, FirstContactDate, FirstOrg, FirstAgent, FirstLOB, Invalid, ORGDesc, Cat1Desc, StatusProfile, CreatedBy)
SELECT '0012616700','May 1 2014 12:00AM','0920@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Returns','ZINTREC','TTN_IFELIX' UNION
SELECT '0012616701','May 1 2014 12:00AM','0920@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Returns','CRMACTIV','TTN_IFELIX' UNION
SELECT '0012627199','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_EMAGISTR',NULL,NULL,NULL,NULL,'ZINTREC','TTN_EMAGISTR' UNION
SELECT '0012627894','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_DESTRADA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_DESTRADA' UNION
SELECT '0012629234','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'WIL_JDALE',NULL,NULL,NULL,NULL,'ZINTREC','WIL_JDALE' UNION
SELECT '0012629632','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTC_RCABALLE',NULL,NULL,NULL,NULL,'ZINTREC','TTC_RCABALLE' UNION
SELECT '0012631852','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_EFERNAND',NULL,NULL,NULL,NULL,'ZINTREC','TTN_EFERNAND' UNION
SELECT '0012632152','May 2 2014 12:00AM','0920@hotmail.com','E-Mail','1','1',NULL,'0012616700','E-Mail','May 2 2014 12:00AM','BNC_TEAM28','TTN_MMIRANDA','Digital Newstand',NULL,'BNC_TEAM28','Digital Newstand','ZINTREC','TTN_MMIRANDA' UNION
SELECT '0016322263','Jan 1 2015 12:00AM','0920@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016322875','Jan 1 2015 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0016322263','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_DPANLAQU','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016322876','Jan 1 2015 12:00AM','0920@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_DPANLAQU' UNION
SELECT '0016333108','Jan 2 2015 12:00AM','0920@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016333115','Jan 2 2015 12:00AM','0920@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016322033','Jan 1 2015 12:00AM','514@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','B&N Membership','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016347927','Jan 2 2015 12:00AM','514@gmail.com','E-Mail','1','1',NULL,'0016322033','E-Mail','Jan 2 2015 12:00AM','ARV_TEAM6','WIL_DLACY','B&N Membership',NULL,'ARV_TEAM6','B&N Membership','ZINTREC','WIL_DLACY' UNION
SELECT '0015220731','Oct 29 2014 12:00AM','accini@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'HHM_TEAM73','Non-Order Related Issues','ZINTREC','HHM_DSURIO' UNION
SELECT '0016321977','Jan 1 2015 12:00AM','accini@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Returns','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332451','Jan 1 2015 12:00AM','accini@gmail.com','E-Mail','1','0',NULL,'0016321977','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_MTAIPEN','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_MTAIPEN' UNION
SELECT '0016321858','Jan 1 2015 12:00AM','ames75@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332534','Jan 1 2015 12:00AM','ames75@gmail.com','E-Mail','1','0',NULL,'0016321858','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_ETEODOSI','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016321951','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Authentication','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322862','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail','1','0',NULL,'0016321951','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM50','TTN_MLAUDE','Client Apps',NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_MLAUDE' UNION
SELECT '0016324817','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail','1','0',NULL,'0016321951','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_IFELIX','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_IFELIX' UNION
SELECT '0016324818','Jan 1 2015 12:00AM','amonday2@aol.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_IFELIX' UNION
SELECT '0016332971','Jan 2 2015 12:00AM','amonday2@aol.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016321801','Jan 1 2015 12:00AM','an.gethin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Authentication','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016335396','Jan 2 2015 12:00AM','an.gethin@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016335564','Jan 2 2015 12:00AM','an.gethin@gmail.com','Telephone call','1','1',NULL,'0016321801','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016402188','Jan 6 2015 12:00AM','an.gethin@gmail.com','Telephone call','1','4',NULL,'0016321801','Telephone call','Jan 6 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016322242','Jan 1 2015 12:00AM','ank@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Third Party Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016393912','Jan 5 2015 12:00AM','ank@yahoo.com','E-Mail','1','4',NULL,'0016322242','E-Mail','Jan 5 2015 12:00AM','LYN_TEAM13','DNEIDHARDT','Third Party Products',NULL,'LYN_TEAM13','Third Party Products','ZINTREC','DNEIDHARDT' UNION
SELECT '0016322150','Jan 1 2015 12:00AM','atona@outlook.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_VDELOSAN' UNION
SELECT '0016322855','Jan 1 2015 12:00AM','atona@outlook.com','E-Mail','1','0',NULL,'0016322150','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_HSEBASTI','1st Edition',NULL,'LYN_TEAM4','1st Edition','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322856','Jan 1 2015 12:00AM','atona@outlook.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','1st Edition','CRMACTIV','TTN_HSEBASTI' UNION
SELECT '0016406767','Jan 6 2015 12:00AM','atona@outlook.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','MZAHLTEN' UNION
SELECT '0016587776','Jan 15 2015 12:00AM','atona@outlook.com','Chat','1','14',NULL,'0016322150','Chat','Jan 15 2015 12:00AM','BNC_TEAM1','TTN_DJALANDO','Client Apps',NULL,'BNC_TEAM1','Client Apps','ZINTREC','TTN_DJALANDO' UNION
SELECT '0016322198','Jan 1 2015 12:00AM','da.c.torres@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322830','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322835','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322847','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322943','Jan 1 2015 12:00AM','da.c.torres@gmail.com','E-Mail','1','0',NULL,'0016322198','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_LLABUTAP','1st Edition',NULL,NULL,'1st Edition','ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322009','Jan 1 2015 12:00AM','ddleton7122@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016541681','Jan 13 2015 12:00AM','ddleton7122@gmail.com','Telephone call','1','12',NULL,'0016322009','Telephone call','Jan 13 2015 12:00AM','HHM_TEAM21','HHM_AFROYALD',NULL,NULL,'HHM_TEAM21',NULL,'ZINTREC','HHM_AFROYALD' UNION
SELECT '0016321896','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322413','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','E-Mail','1','0',NULL,'0016321896','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM52','TTN_MMANDIN','BN Products',NULL,'BNC_TEAM52','BN Products','ZINTREC','TTN_MMANDIN' UNION
SELECT '0016322416','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MMANDIN' UNION
SELECT '0016321979','Jan 1 2015 12:00AM','emartin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Authentication','ZINTREC','TTN_AANIVES' UNION
SELECT '0016322221','Jan 1 2015 12:00AM','emartin@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016323032','Jan 1 2015 12:00AM','emartin@gmail.com','Telephone call','1','0',NULL,'0016321979','Telephone call','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016322174','Jan 1 2015 12:00AM','enfrost@msn.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016322819','Jan 1 2015 12:00AM','enfrost@msn.com','E-Mail','1','0',NULL,'0016322174','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_GPANGILI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_GPANGILI' UNION
SELECT '0016339675','Jan 2 2015 12:00AM','enfrost@msn.com','Telephone call','1','1',NULL,'0016322174','Telephone call','Jan 2 2015 12:00AM','BNC_TEAM55','TTG_ADELATOR','Payment',NULL,'BNC_TEAM55','Payment','ZINTREC','TTG_ADELATOR' UNION
SELECT '0004668977','Mar 13 2013 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','ACC_JZUNIGA' UNION
SELECT '0004671174','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM6','KNH_SAJJAMPU',NULL,NULL,'KNH_TEAM6',NULL,'ZINTREC','KNH_SAJJAMPU' UNION
SELECT '0004674533','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM3','KNH_RTHALLAP',NULL,NULL,'KNH_TEAM3',NULL,'ZINTREC','KNH_RTHALLAP' UNION
SELECT '0004678656','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM3','KNH_GRODDA',NULL,NULL,'KNH_TEAM3',NULL,'ZINTREC','KNH_GRODDA' UNION
SELECT '0004682262','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM6','KNH_NYALAMAN',NULL,NULL,'KNH_TEAM6',NULL,'ZINTREC','KNH_NYALAMAN' UNION
SELECT '0016321708','Jan 1 2015 12:00AM','eod.eight@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM5','Tablet','ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016419045','Jan 6 2015 12:00AM','eod.eight@gmail.com','E-Mail','1','5',NULL,'0016321708','E-Mail','Jan 6 2015 12:00AM','BNC_TEAM50','TTN_JVILLAFU','Tablet',NULL,'BNC_TEAM50','Tablet','ZINTREC','TTN_JVILLAFU' UNION
SELECT '0016479879','Jan 9 2015 12:00AM','eod.eight@gmail.com','Telephone call','1','3',NULL,'0016321708','Telephone call','Jan 9 2015 12:00AM',NULL,'TTN_CROSALES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_CROSALES' UNION
SELECT '0016495685','Jan 10 2015 12:00AM','eod.eight@gmail.com','Chat','1','1',NULL,'0016321708','Chat','Jan 10 2015 12:00AM','TTN_FU1','TTN_JDAEZ','1st Edition',NULL,'TTN_FU1','1st Edition','ZINTREC','TTN_JDAEZ' UNION
SELECT '0016495686','Jan 10 2015 12:00AM','eod.eight@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','1st Edition','CRMACTIV','TTN_JDAEZ' UNION
SELECT '0016516041','Jan 12 2015 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016516043','Jan 12 2015 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016322313','Jan 1 2015 12:00AM','ephdolan1@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016417949','Jan 6 2015 12:00AM','ephdolan1@gmail.com','Telephone call','1','5',NULL,'0016322313','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM2','TTN_KBAGAIN','Payment',NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016322265','Jan 1 2015 12:00AM','erervillemom@Yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM1','Authentication','ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016328941','Jan 1 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','0',NULL,'0016322265','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_MAGBANGL',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016333217','Jan 2 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','1',NULL,'0016322265','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016351870','Jan 3 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','1',NULL,'0016322265','E-Mail','Jan 3 2015 12:00AM',NULL,'TTN_GPANGILI','Account Management',NULL,NULL,'Account Management','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016322208','Jan 1 2015 12:00AM','ewis2002@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MCANTOS' UNION
SELECT '0016322841','Jan 1 2015 12:00AM','ewis2002@yahoo.com','E-Mail','1','0',NULL,'0016322208','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_DPANLAQU',NULL,NULL,NULL,NULL,'ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016324682','Jan 1 2015 12:00AM','ewis2002@yahoo.com','Chat','1','0',NULL,'0016322208','Chat','Jan 1 2015 12:00AM','BNC_TEAM29','TTN_ABERJA','Color',NULL,'BNC_TEAM29','Color','ZINTREC','TTN_ABERJA' UNION
SELECT '0016322210','Jan 1 2015 12:00AM','girl@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322499','Jan 1 2015 12:00AM','girl@gmail.com','E-Mail','1','0',NULL,'0016322210','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','BN Products',NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016488985','Jan 10 2015 12:00AM','girl@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MSOLSONA' UNION
SELECT '0016321706','Jan 1 2015 12:00AM','gosian.amber@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322347','Jan 1 2015 12:00AM','gosian.amber@aol.com','E-Mail','1','0',NULL,'0016321706','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_JALVAREZ','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0004182287','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM8',NULL,'ZINTREC','TTN_VSANTOS' UNION
SELECT '0004182369','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0004182287','Telephone call','Feb 18 2013 12:00AM','BNC_TEAM8','TTN_VSANTOS',NULL,NULL,'BNC_TEAM8',NULL,'ZINTREC','TTN_VSANTOS' UNION
SELECT '0004182744','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0004182287','Telephone call','Feb 18 2013 12:00AM','LYN_TEAM4','WIL_BXEASTER','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','WIL_BXEASTER' UNION
SELECT '0004182745','Feb 18 2013 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','WIL_BXEASTER' UNION
SELECT '0004194344','Feb 19 2013 12:00AM','gsb@comcast.net','Telephone call','1','1',NULL,'0004182287','Telephone call','Feb 19 2013 12:00AM','LYN_TEAM4','WRODRIGUEZ','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','WRODRIGUEZ' UNION
SELECT '0004977611','Mar 29 2013 12:00AM','gsb@comcast.net','Telephone call','1','38',NULL,'0004182287','Telephone call','Mar 29 2013 12:00AM',NULL,'MPOLKOWSKA',NULL,NULL,NULL,NULL,'ZINTREC','MPOLKOWSKA' UNION
SELECT '0009247597','Nov 15 2013 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM29',NULL,'ZINTREC','TTN_RFLORES' UNION
SELECT '0010743585','Jan 13 2014 12:00AM','gsb@comcast.net','Chat','1','59',NULL,'0009247597','Chat','Jan 13 2014 12:00AM','TTN_FU1','TTN_UREJEI_3','Downloadable Products',NULL,'TTN_FU1','Downloadable Products','ZINTREC','TTN_UREJEI_3' UNION
SELECT '0010743586','Jan 13 2014 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Downloadable Products','CRMACTIV','TTN_UREJEI_3' UNION
SELECT '0010744259','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM','BNC_TEAM27','TTN_MSANJUAN','Downloadable Products',NULL,'BNC_TEAM27','Downloadable Products','ZINTREC','TTN_MSANJUAN' UNION
SELECT '0010744558','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM',NULL,'HHM_ABOLANOS',NULL,NULL,NULL,NULL,'ZINTREC','HHM_ABOLANOS' UNION
SELECT '0010744949','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM','BNC_TEAM27','HHM_ABOLANOS','Downloadable Products',NULL,'BNC_TEAM27','Downloadable Products','ZINTREC','HHM_ABOLANOS' UNION
SELECT '0016321794','Jan 1 2015 12:00AM','gsb@comcast.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','ZINTREC','TTN_MLAUDE' UNION
SELECT '0016321831','Jan 1 2015 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','CRMACTIV','TTN_MLAUDE' UNION
SELECT '0016332755','Jan 1 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MALCANTA' UNION
SELECT '0016333235','Jan 2 2015 12:00AM','gsb@comcast.net','E-Mail','1','1',NULL,'0016321794','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_SMANIGBA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMANIGBA' UNION
SELECT '0016333818','Jan 2 2015 12:00AM','gsb@comcast.net','E-Mail','1','0',NULL,'0016321794','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016336801','Jan 2 2015 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0016321794','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016337066','Jan 2 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016362195','Jan 3 2015 12:00AM','gsb@comcast.net','E-Mail','1','1',NULL,'0016321794','E-Mail','Jan 3 2015 12:00AM','TTN_FU1','WIL_PLUURS2','Simple Touch',NULL,'TTN_FU1','Simple Touch','ZINTREC','WIL_PLUURS2' UNION
SELECT '0016379344','Jan 5 2015 12:00AM','gsb@comcast.net','E-Mail','1','2',NULL,'0016321794','E-Mail','Jan 5 2015 12:00AM','TTN_FU1','TTN_AANIVES','Simple Touch',NULL,'TTN_FU1','Simple Touch','ZINTREC','TTN_AANIVES' UNION
SELECT '0016379363','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016379371','Jan 5 2015 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','CRMACTIV','TTN_AANIVES' UNION
SELECT '0016379376','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0016321794','Telephone call','Jan 5 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016401115','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0001982338','Nov 29 2012 12:00AM','hbriggs@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_SUP1','BN Products','ZINTREC','WIL_DASKILDS' UNION
SELECT '0009773245','Dec 9 2013 12:00AM','hbriggs@comcast.net','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM6','BN Products','ZINTREC','WIL_KGOLDEN' UNION
SELECT '0009773246','Dec 9 2013 12:00AM','hbriggs@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM6','BN Products','CRMACTIV','WIL_KGOLDEN' UNION
SELECT '0011983639','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','HHM_MSANDIEG' UNION
SELECT '0011983653','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call','1','0',NULL,'0011983639','Telephone call','Mar 20 2014 12:00AM','HHM_TEAM30','HHM_MSALVADO','BN Products',NULL,'HHM_TEAM30','BN Products','ZINTREC','HHM_MSALVADO' UNION
SELECT '0011984891','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call','1','0',NULL,'0011983639','Telephone call','Mar 20 2014 12:00AM','HHM_TEAM73','HHM_MSANDIEG',NULL,NULL,'HHM_TEAM73',NULL,'ZINTREC','HHM_MSANDIEG' UNION
SELECT '0016321834','Jan 1 2015 12:00AM','hbriggs@comcast.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JONG' UNION
SELECT '0016328562','Jan 1 2015 12:00AM','hbriggs@comcast.net','E-Mail','1','0',NULL,'0016321834','E-Mail','Jan 1 2015 12:00AM',NULL,'EMCCASKILL',NULL,NULL,NULL,NULL,'ZINTREC','EMCCASKILL' UNION
SELECT '0009572285','Dec 1 2013 12:00AM','hjm@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM3','Payment','ZINTREC','KNH_VSIRIPAL' UNION
SELECT '0010089922','Dec 20 2013 12:00AM','hjm@gmail.com','Telephone call','1','19',NULL,'0009572285','Telephone call','Dec 20 2013 12:00AM','BNC_TEAM6','TTN_NTORRES',NULL,NULL,'BNC_TEAM6',NULL,'ZINTREC','TTN_NTORRES' UNION
SELECT '0011554696','Feb 24 2014 12:00AM','hjm@gmail.com','Chat',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM10','Nook Color','ZINTREC','TTN_MANDAL' UNION
SELECT '0016322191','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322412','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail','1','0',NULL,'0016322191','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016332562','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail','1','0',NULL,'0016322191','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_MMONTEMA','BN Products',NULL,'TTN_FU1','BN Products','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016332563','Jan 1 2015 12:00AM','hjm@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_MMONTEMA' UNION
SELECT '0013892891','Jul 25 2014 12:00AM','i.beaugelin@gmail.com','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM14','Third Party Products','ZINTREC','TTN_JVALDERA' UNION
SELECT '0016322269','Jan 1 2015 12:00AM','i.beaugelin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JJULIAN' UNION
SELECT '0016322569','Jan 1 2015 12:00AM','i.beaugelin@gmail.com','E-Mail','1','0',NULL,'0016322269','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSANPEDR','Third Party Products',NULL,'BNC_TEAM46','Third Party Products','ZINTREC','TTN_MSANPEDR' UNION
SELECT '0009505578','Nov 28 2013 12:00AM','ier@multideck.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM14','BN Products','ZINTREC','TTN_DCOLLA_3' UNION
SELECT '0009883097','Dec 12 2013 12:00AM','ier@multideck.com','Telephone call','1','14',NULL,'0009505578','Telephone call','Dec 12 2013 12:00AM',NULL,'KNH_SJONNALA',NULL,NULL,NULL,NULL,'ZINTREC','KNH_SJONNALA' UNION
SELECT '0009883147','Dec 12 2013 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0009505578','Telephone call','Dec 12 2013 12:00AM',NULL,'KNH_SJONNALA',NULL,NULL,NULL,NULL,'ZINTREC','KNH_SJONNALA' UNION
SELECT '0011914548','Mar 16 2014 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JALEJAND' UNION
SELECT '0011914624','Mar 16 2014 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0011914548','Telephone call','Mar 16 2014 12:00AM','TT_Team 1','TTN_JALEJAND',NULL,NULL,'TT_Team 1',NULL,'ZINTREC','TTN_JALEJAND' UNION
SELECT '0016322206','Jan 1 2015 12:00AM','ier@multideck.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_LGALANG' UNION
SELECT '0016322860','Jan 1 2015 12:00AM','ier@multideck.com','E-Mail','1','0',NULL,'0016322206','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_GPANGILI','1st Edition',NULL,NULL,'1st Edition','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016372626','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','3',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM','LYN_CSR25','TTN_EGUMASIN','Client Apps',NULL,'LYN_CSR25','Client Apps','ZINTREC','TTN_EGUMASIN' UNION
SELECT '0016372787','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'HHM_MXPASCUA',NULL,NULL,NULL,NULL,'ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016372891','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016372936','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'TTN_JCABRERA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JCABRERA' UNION
SELECT '0016372980','Jan 4 2015 12:00AM','ier@multideck.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_CSR25','Client Apps','CRMACTIV','HHM_MXPASCUA' UNION
SELECT '0016372983','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM','LYN_CSR25','HHM_MXPASCUA','Client Apps',NULL,'LYN_CSR25','Client Apps','ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016373155','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'TTN_JCABRERA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JCABRERA' UNION
SELECT '0016403410','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','2',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM',NULL,'TTN_MSOLSONA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MSOLSONA' UNION
SELECT '0016414533','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','HHM_KBERMAS' UNION
SELECT '0016415078','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM',NULL,'TTG_DRODRIGU',NULL,NULL,NULL,NULL,'ZINTREC','TTG_DRODRIGU' UNION
SELECT '0016415125','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM54','TTG_DRODRIGU','HD',NULL,'BNC_TEAM54','HD','ZINTREC','TTG_DRODRIGU' UNION
SELECT '0016415400','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM54','HHM_MPEARLY','HD',NULL,'BNC_TEAM54','HD','ZINTREC','HHM_MPEARLY' UNION
SELECT '0016493832','Jan 10 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','DNEWKIRK' UNION
SELECT '0016322159','Jan 1 2015 12:00AM','ilyncranmer@att.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016332486','Jan 1 2015 12:00AM','ilyncranmer@att.net','E-Mail','1','0',NULL,'0016322159','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM4','TTN_MAGUANZA','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_MAGUANZA' UNION
SELECT '0006854260','Jul 8 2013 12:00AM','ith020@sc.rr.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ACC_TEAM3',NULL,'ZINTREC','ACC_RLOAIZA' UNION
SELECT '0006854261','Jul 8 2013 12:00AM','ith020@sc.rr.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ACC_TEAM3',NULL,'CRMACTIV','ACC_RLOAIZA' UNION
SELECT '0006869057','Jul 9 2013 12:00AM','ith020@sc.rr.com','Telephone call','1','1',NULL,'0006854260','Telephone call','Jul 9 2013 12:00AM','HHM_TEAM44','HHM_CJOBETH','NOOK 1st Gen (wi-fi/3G)',NULL,'HHM_TEAM44','NOOK 1st Gen (wi-fi/3G)','ZINTREC','HHM_CJOBETH' UNION
SELECT '0007141009','Jul 24 2013 12:00AM','ith020@sc.rr.com','Telephone call','1','15',NULL,'0006854260','Telephone call','Jul 24 2013 12:00AM','ATX_TEAM7','ATX_KCASTRO',NULL,NULL,'ATX_TEAM7',NULL,'ZINTREC','ATX_KCASTRO' UNION
SELECT '0011368478','Feb 12 2014 12:00AM','ith020@sc.rr.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM1','Downloadable Products','ZINTREC','TTC_MINCIO_2' UNION
SELECT '0011369553','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM9','TTN_LROCO',NULL,NULL,'BNC_TEAM9',NULL,'ZINTREC','TTN_LROCO' UNION
SELECT '0011369692','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM50','TTN_CMASINDO',NULL,NULL,'BNC_TEAM50',NULL,'ZINTREC','TTN_CMASINDO' UNION
SELECT '0011370286','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM9','TTN_LROCO',NULL,NULL,'BNC_TEAM9',NULL,'ZINTREC','TTN_LROCO' UNION
SELECT '0011771856','Mar 7 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','23',NULL,'0011368478','Telephone call','Mar 7 2014 12:00AM','HHM_TEAM34','HHM_BVALIENT',NULL,NULL,'HHM_TEAM34',NULL,'ZINTREC','HHM_BVALIENT' UNION
SELECT '0011772394','Mar 7 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Mar 7 2014 12:00AM',NULL,'HHM_LDIAZ',NULL,NULL,NULL,NULL,'ZINTREC','HHM_LDIAZ' UNION
SELECT '0011916545','Mar 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','10',NULL,'0011368478','E-Mail','Mar 17 2014 12:00AM','BNC_TEAM28','TTN_AANIVES','Downloadable Products',NULL,'BNC_TEAM28','Downloadable Products','ZINTREC','TTN_AANIVES' UNION
SELECT '0011916546','Mar 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','0',NULL,'0011368478','E-Mail','Mar 17 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0011934738','Mar 18 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','1',NULL,'0011368478','Telephone call','Mar 18 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0011970531','Mar 20 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','2',NULL,'0011368478','Telephone call','Mar 20 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0012423801','Apr 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','28',NULL,'0011368478','E-Mail','Apr 17 2014 12:00AM','BNC_TEAM4','TTN_DESTRADA',NULL,NULL,'BNC_TEAM4',NULL,'ZINTREC','TTN_DESTRADA' UNION
SELECT '0012430202','Apr 18 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','1',NULL,'0011368478','E-Mail','Apr 18 2014 12:00AM','BNC_TEAM50','TTN_RLLAVOR','Client Apps',NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_RLLAVOR' UNION
SELECT '0012866672','May 18 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','30',NULL,'0011368478','E-Mail','May 18 2014 12:00AM','BNC_TEAM28','TTN_JZAMORA','Downloadable Products',NULL,'BNC_TEAM28','Downloadable Products','ZINTREC','TTN_JZAMORA' UNION
SELECT '0016322248','Jan 1 2015 12:00AM','ith020@sc.rr.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM8','Client Apps','ZINTREC','TTN_MEVARDON' UNION
SELECT '0016595318','Jan 15 2015 12:00AM','ith020@sc.rr.com','Chat','1','14',NULL,'0016322248','Chat','Jan 15 2015 12:00AM',NULL,'TTN_JJUTARA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JJUTARA' UNION
SELECT '0016322247','Jan 1 2015 12:00AM','ixn@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016332533','Jan 1 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_SMALLARI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMALLARI' UNION
SELECT '0016333580','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','1',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016333611','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016351353','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0002211463','Dec 7 2012 12:00AM','jim@frontiernet.net','Chat',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM6','Payment','ZINTREC','KNH_DREDDY' UNION
SELECT '0016321857','Jan 1 2015 12:00AM','jim@frontiernet.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016334521','Jan 2 2015 12:00AM','jim@frontiernet.net','E-Mail','1','1',NULL,'0016321857','E-Mail','Jan 2 2015 12:00AM','ARV_FU1','WIL_CVARONA','Account Management',NULL,'ARV_FU1','Account Management','ZINTREC','WIL_CVARONA' UNION
SELECT '0016322243','Jan 1 2015 12:00AM','kcpa@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_AANIVES' UNION
SELECT '0016329401','Jan 1 2015 12:00AM','kcpa@gmail.com','E-Mail','1','0',NULL,'0016322243','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM28','TTN_MAGBANGL','Client Apps',NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016332481','Jan 1 2015 12:00AM','kcpa@gmail.com','Telephone call','1','0',NULL,'0016322243','Telephone call','Jan 1 2015 12:00AM','BNC_TEAM28','TTN_AANIVES','Client Apps',NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_AANIVES' UNION
SELECT '0016321818','Jan 1 2015 12:00AM','l@kerstin-foelting.de','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016366843','Jan 4 2015 12:00AM','l@kerstin-foelting.de','E-Mail','1','3',NULL,'0016321818','E-Mail','Jan 4 2015 12:00AM','ARV_TEAM7','WIL_CCATTNEL',NULL,NULL,'ARV_TEAM7',NULL,'ZINTREC','WIL_CCATTNEL' UNION
SELECT '0014770069','Sep 25 2014 12:00AM','l0kecky@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'HHM_TEAM8',NULL,'ZINTREC','HHM_JMONCATA' UNION
SELECT '0016321744','Jan 1 2015 12:00AM','l0kecky@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','B&N Membership','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0016332754','Jan 1 2015 12:00AM','l0kecky@gmail.com','E-Mail','1','0',NULL,'0016321744','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM4','TTN_RGABUY_2','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016333246','Jan 2 2015 12:00AM','l0kecky@gmail.com','E-Mail','1','1',NULL,'0016321744','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM4','TTN_SDUNGCA','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_SDUNGCA' UNION
SELECT '0016446766','Jan 8 2015 12:00AM','l0kecky@gmail.com','Telephone call','1','6',NULL,'0016321744','Telephone call','Jan 8 2015 12:00AM',NULL,'TTN_RGABUY_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RGABUY_2' UNION
SELECT '0012162188','Apr 1 2014 12:00AM','leejhaught@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_CGAITO' UNION
SELECT '0012462055','Apr 20 2014 12:00AM','leejhaught@gmail.com','E-Mail','1','19',NULL,'0012162188','E-Mail','Apr 20 2014 12:00AM',NULL,'TTN_RHICBA_3','Client Apps',NULL,NULL,'Client Apps','ZINTREC','TTN_RHICBA_3' UNION
SELECT '0016322278','Jan 1 2015 12:00AM','leejhaught@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM5','Client Apps','ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016516416','Jan 12 2015 12:00AM','leejhaught@gmail.com','E-Mail','1','11',NULL,'0016322278','E-Mail','Jan 12 2015 12:00AM',NULL,'TTN_JERESE','Client Apps',NULL,NULL,'Client Apps','ZINTREC','TTN_JERESE' UNION
SELECT '0016516802','Jan 12 2015 12:00AM','leejhaught@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_JERESE' UNION
SELECT '0016322279','Jan 1 2015 12:00AM','lerm2018@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_MAGUANZA' UNION
SELECT '0016332493','Jan 1 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','0',NULL,'0016322279','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_SDUNGCA','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_SDUNGCA' UNION
SELECT '0016351442','Jan 2 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','1',NULL,'0016322279','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_CGAITO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_CGAITO' UNION
SELECT '0016375754','Jan 4 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','2',NULL,'0016322279','E-Mail','Jan 4 2015 12:00AM','BNC_TEAM2','WIL_RSUMMERS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','WIL_RSUMMERS' UNION
SELECT '0001439787','Nov 5 2012 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_TEAM6','Downloadable Products','ZINTREC','WIL_CTRIPLIN' UNION
SELECT '0001440751','Nov 5 2012 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0001439787','Telephone call','Nov 5 2012 12:00AM','HHM_TEAM32','HHM_LDIONA','Digital Newstand',NULL,'HHM_TEAM32','Digital Newstand','ZINTREC','HHM_LDIONA' UNION
SELECT '0003139294','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','ACC_RMORA' UNION
SELECT '0003139568','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0003139294','Telephone call','Jan 6 2013 12:00AM','ACC_TEAM1','ACC_RMORA',NULL,NULL,'ACC_TEAM1',NULL,'ZINTREC','ACC_RMORA' UNION
SELECT '0003140546','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0003139294','Telephone call','Jan 6 2013 12:00AM','HHM_TEAM45','HHM_CAMEN','Digital Newstand',NULL,'HHM_TEAM45','Digital Newstand','ZINTREC','HHM_CAMEN' UNION
SELECT '0003955644','Feb 8 2013 12:00AM','lls@iocnet.net','Telephone call','1','33',NULL,'0003139294','Telephone call','Feb 8 2013 12:00AM','ARV_TEAM6','WIL_CBALL','BN Products',NULL,'ARV_TEAM6','BN Products','ZINTREC','WIL_CBALL' UNION
SELECT '0004229236','Feb 20 2013 12:00AM','lls@iocnet.net','Telephone call','1','12',NULL,'0003139294','Telephone call','Feb 20 2013 12:00AM','HHM_TEAM35','HHM_KCORUNA','Digital Newstand',NULL,'HHM_TEAM35','Digital Newstand','ZINTREC','HHM_KCORUNA' UNION
SELECT '0007698768','Aug 24 2013 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM7',NULL,'ZINTREC','TTN_EGUMASIN' UNION
SELECT '0007896676','Sep 3 2013 12:00AM','lls@iocnet.net','Telephone call','1','10',NULL,'0007698768','Telephone call','Sep 3 2013 12:00AM','BNC_TEAM29','TTN_FBASILIO',NULL,NULL,'BNC_TEAM29',NULL,'ZINTREC','TTN_FBASILIO' UNION
SELECT '0008986057','Nov 1 2013 12:00AM','lls@iocnet.net','Chat','1','59',NULL,'0007698768','Chat','Nov 1 2013 12:00AM','KNH_TEAM8','KNH_PVADICHA',NULL,NULL,'KNH_TEAM8',NULL,'ZINTREC','KNH_PVADICHA' UNION
SELECT '0009001670','Nov 1 2013 12:00AM','lls@iocnet.net','Chat','1','0',NULL,'0007698768','Chat','Nov 1 2013 12:00AM','BNC_TEAM11','TTN_LMEDINA','Downloadable Products',NULL,'BNC_TEAM11','Downloadable Products','ZINTREC','TTN_LMEDINA' UNION
SELECT '0016321699','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322411','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail','1','0',NULL,'0016321699','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016322791','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail','1','0',NULL,'0016321699','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016332558','Jan 1 2015 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016321786','Jan 1 2015 12:00AM','lmagner@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Authentication','ZINTREC','TTN_ARONCALE' UNION
SELECT '0016345049','Jan 2 2015 12:00AM','lmagner@gmail.com','E-Mail','1','1',NULL,'0016321786','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM50','TTN_PTAMAYO','Simple Touch',NULL,'BNC_TEAM50','Simple Touch','ZINTREC','TTN_PTAMAYO' UNION
SELECT '0016322250','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0016322544','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','BN Products',NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016322547','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_ETEODOSI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016333278','Jan 2 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','1',NULL,'0016322250','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016333408','Jan 2 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MMADO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MMADO' UNION
SELECT '0016359754','Jan 3 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','1',NULL,'0016322250','E-Mail','Jan 3 2015 12:00AM','BNC_TEAM2','WIL_PLUURS2','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','WIL_PLUURS2' UNION
SELECT '0015000033','Oct 13 2014 12:00AM','milov@gmu.edu','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM3','B&N Membership','ZINTREC','TTN_JBALILLA' UNION
SELECT '0015097746','Oct 20 2014 12:00AM','milov@gmu.edu','E-Mail','1','7',NULL,'0015000033','E-Mail','Oct 20 2014 12:00AM','ARV_FU1','WIL_NBASDEO','BN Products',NULL,'ARV_FU1','BN Products','ZINTREC','WIL_NBASDEO' UNION
SELECT '0015097954','Oct 20 2014 12:00AM','milov@gmu.edu','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_FU1','BN Products','CRMACTIV','WIL_NBASDEO' UNION
SELECT '0015097956','Oct 20 2014 12:00AM','milov@gmu.edu','Telephone call','1','0',NULL,'0015000033','Telephone call','Oct 20 2014 12:00AM','ARV_FU1','WIL_NBASDEO','BN Products',NULL,'ARV_FU1','BN Products','ZINTREC','WIL_NBASDEO' UNION
SELECT '0016321854','Jan 1 2015 12:00AM','milov@gmu.edu','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Promotions & Coupons','ZINTREC','TTN_MSANPEDR' UNION
SELECT '0016423855','Jan 7 2015 12:00AM','milov@gmu.edu','E-Mail','1','6',NULL,'0016321854','E-Mail','Jan 7 2015 12:00AM','BNC_TEAM52','TTN_MMANDIN','Third Party Products',NULL,'BNC_TEAM52','Third Party Products','ZINTREC','TTN_MMANDIN' UNION
SELECT '0016423928','Jan 7 2015 12:00AM','milov@gmu.edu','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MMANDIN' UNION
SELECT '0016322303','Jan 1 2015 12:00AM','nabasgrif@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_RPRICE' UNION
SELECT '0016332714','Jan 1 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','0',NULL,'0016322303','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_SMALLARI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMALLARI' UNION
SELECT '0016333657','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','1',NULL,'0016322303','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_RMARQUEZ',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RMARQUEZ' UNION
SELECT '0016333698','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','0',NULL,'0016322303','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_KEJANDA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KEJANDA' UNION
SELECT '0016333924','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','Telephone call','1','0',NULL,'0016322303','Telephone call','Jan 2 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016352765','Jan 3 2015 12:00AM','nabasgrif@yahoo.com','Telephone call','1','1',NULL,'0016322303','Telephone call','Jan 3 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0009949687','Dec 15 2013 12:00AM','neece@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0009950063','Dec 15 2013 12:00AM','neece@gmail.com','E-Mail','1','0',NULL,'0009949687','E-Mail','Dec 15 2013 12:00AM','BNC_TEAM50','TTN_HSEBASTI','Downloadable Products',NULL,'BNC_TEAM50','Downloadable Products','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322257','Jan 1 2015 12:00AM','neece@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Non-Order Related Issues','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016333169','Jan 2 2015 12:00AM','neece@gmail.com','E-Mail','1','1',NULL,'0016322257','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','Payment',NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016321689','Jan 1 2015 12:00AM','odynelson@bresnan.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016378823','Jan 5 2015 12:00AM','odynelson@bresnan.net','Telephone call','1','4',NULL,'0016321689','Telephone call','Jan 5 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016515135','Jan 12 2015 12:00AM','odynelson@bresnan.net','Telephone call','1','7',NULL,'0016321689','Telephone call','Jan 12 2015 12:00AM',NULL,'TTN_ETEODOSI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016322273','Jan 1 2015 12:00AM','onley817@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM53','Authentication','ZINTREC','TTN_MALCANTA' UNION
SELECT '0016323668','Jan 1 2015 12:00AM','onley817@gmail.com','E-Mail','1','0',NULL,'0016322273','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM53','TTN_MAGBANGL','HD+',NULL,'BNC_TEAM53','HD+','ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016323669','Jan 1 2015 12:00AM','onley817@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','HD+','CRMACTIV','TTN_MAGBANGL' UNION
SELECT '0016334754','Jan 2 2015 12:00AM','onley817@gmail.com','Telephone call','1','1',NULL,'0016322273','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016334757','Jan 2 2015 12:00AM','onley817@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016321829','Jan 1 2015 12:00AM','pson@gipsonbearing.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','ZINTREC','TTN_VDELOSAN' UNION
SELECT '0016321830','Jan 1 2015 12:00AM','pson@gipsonbearing.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_VDELOSAN' UNION
SELECT '0016333023','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','1',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016333372','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','0',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016351401','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','0',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_ETEODOSI','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016417400','Jan 6 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','4',NULL,'0016321829','Telephone call','Jan 6 2015 12:00AM',NULL,'HHM_RSUAREZ',NULL,NULL,NULL,NULL,'ZINTREC','HHM_RSUAREZ' UNION
SELECT '0016420990','Jan 6 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','0',NULL,'0016321829','Telephone call','Jan 6 2015 12:00AM','HHM_TEAM35','HHM_RSUAREZ',NULL,NULL,'HHM_TEAM35',NULL,'ZINTREC','HHM_RSUAREZ' UNION
SELECT '0016502804','Jan 11 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','5',NULL,'0016321829','Telephone call','Jan 11 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016321690','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016322435','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','E-Mail','1','0',NULL,'0016321690','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_AGRAFIL','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322436','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_AGRAFIL' UNION
SELECT '0016322467','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_AGRAFIL' UNION
SELECT '0016322473','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Telephone call','1','0',NULL,'0016321690','Telephone call','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_AGRAFIL','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322015','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_GPANGILI' UNION
SELECT '0016322409','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail','1','0',NULL,'0016322015','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_JBALOGNA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JBALOGNA' UNION
SELECT '0016322557','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail','1','0',NULL,'0016322015','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_VDELOSAN','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_VDELOSAN' UNION
SELECT '0005027950','Apr 1 2013 12:00AM','tm2@bellsouth.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_FU1',NULL,'ZINTREC','WIL_FALLEN' UNION
SELECT '0005188148','Apr 10 2013 12:00AM','tm2@bellsouth.net','Telephone call','1','9',NULL,'0005027950','Telephone call','Apr 10 2013 12:00AM',NULL,'WIL_FALLEN',NULL,NULL,NULL,NULL,'ZINTREC','WIL_FALLEN' UNION
SELECT '0016321965','Jan 1 2015 12:00AM','tm2@bellsouth.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016332503','Jan 1 2015 12:00AM','tm2@bellsouth.net','E-Mail','1','0',NULL,'0016321965','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_RPRICE','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_RPRICE' UNION
SELECT '0016351840','Jan 3 2015 12:00AM','tm2@bellsouth.net','E-Mail','1','2',NULL,'0016321965','E-Mail','Jan 3 2015 12:00AM','TTN_FU1','TTN_MTAIPEN','B&N Membership',NULL,'TTN_FU1','B&N Membership','ZINTREC','TTN_MTAIPEN' UNION
SELECT '0016351841','Jan 3 2015 12:00AM','tm2@bellsouth.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','B&N Membership','CRMACTIV','TTN_MTAIPEN' UNION
SELECT '0011897010','Mar 15 2014 12:00AM','trozzi@verizon.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Account Management','ZINTREC','TTN_RGUIBAN' UNION
SELECT '0011897011','Mar 15 2014 12:00AM','trozzi@verizon.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Account Management','CRMACTIV','TTN_RGUIBAN' UNION
SELECT '0016322176','Jan 1 2015 12:00AM','trozzi@verizon.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016322839','Jan 1 2015 12:00AM','trozzi@verizon.net','E-Mail','1','0',NULL,'0016322176','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016561654','Jan 14 2015 12:00AM','trozzi@verizon.net','E-Mail','1','13',NULL,'0016322176','E-Mail','Jan 14 2015 12:00AM','BNC_TEAM53','TTN_MALCANTA','Client Apps',NULL,'BNC_TEAM53','Client Apps','ZINTREC','TTN_MALCANTA' UNION
SELECT '0016321816','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322346','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail','1','0',NULL,'0016321816','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016332653','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail','1','0',NULL,'0016321816','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_KANONUEV','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016332654','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_KANONUEV' UNION
SELECT '0016389321','Jan 5 2015 12:00AM','ttanyncox@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','NNADIR' UNION
SELECT '0016322240','Jan 1 2015 12:00AM','unt@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_RPRICE' UNION
SELECT '0016334817','Jan 2 2015 12:00AM','unt@aol.com','E-Mail','1','1',NULL,'0016322240','E-Mail','Jan 2 2015 12:00AM','ARV_TEAM1','WIL_PLUURS2','Samsung GT4-7',NULL,'ARV_TEAM1','Samsung GT4-7','ZINTREC','WIL_PLUURS2' UNION
SELECT '0003224724','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM1',NULL,'ZINTREC','KNH_NKPADM_2' UNION
SELECT '0003227956','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM','BNC_TEAM30','TTN_RCUENO','Nook Color',NULL,'BNC_TEAM30','Nook Color','ZINTREC','TTN_RCUENO' UNION
SELECT '0003227961','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0003224724','Chat','Jan 9 2013 12:00AM','BNC_TEAM31','TTN_LMENESES','Nook Color',NULL,'BNC_TEAM31','Nook Color','ZINTREC','TTN_LMENESES' UNION
SELECT '0003228053','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM',NULL,'TTN_RCUENO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RCUENO' UNION
SELECT '0003228416','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM','BNC_TEAM30','HHM_MSALES','Nook Color',NULL,'BNC_TEAM30','Nook Color','ZINTREC','HHM_MSALES' UNION
SELECT '0003228610','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM',NULL,'TTN_RCUENO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RCUENO' UNION
SELECT '0003394677','Jan 15 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','6',NULL,'0003224724','Telephone call','Jan 15 2013 12:00AM',NULL,'TTN_UREJEINA','Returns',NULL,NULL,'Returns','ZINTREC','TTN_UREJEINA' UNION
SELECT '0003394895','Jan 15 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 15 2013 12:00AM',NULL,'HHM_JFADERAN','Returns',NULL,NULL,'Returns','ZINTREC','HHM_JFADERAN' UNION
SELECT '0003564291','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','7',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM','BNC_TEAM26','TTC_MTAJONER','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','TTC_MTAJONER' UNION
SELECT '0003565813','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM',NULL,'HHM_HDELACRU',NULL,NULL,NULL,NULL,'ZINTREC','HHM_HDELACRU' UNION
SELECT '0003569818','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM','BNC_TEAM26','HHM_HDELACRU','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','HHM_HDELACRU' UNION
SELECT '0003811315','Feb 1 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','10',NULL,'0003224724','Telephone call','Feb 1 2013 12:00AM','BNC_TEAM26','ERAMOS','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','ERAMOS' UNION
SELECT '0005038725','Apr 1 2013 12:00AM','utifulone120@yahoo.com','Chat','1','59',NULL,'0003224724','Chat','Apr 1 2013 12:00AM','BNC_TEAM1','TTN_MSAMUL_2','Downloadable Products',NULL,'BNC_TEAM1','Downloadable Products','ZINTREC','TTN_MSAMUL_2' UNION
SELECT '0016322239','Jan 1 2015 12:00AM','utifulone120@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Authentication','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016328017','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM',NULL,'TTN_RVISTA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RVISTA' UNION
SELECT '0016328057','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM',NULL,'TTC_CRAVALO',NULL,NULL,NULL,NULL,'ZINTREC','TTC_CRAVALO' UNION
SELECT '0016328168','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM','BNC_TEAM1','TTN_HALTAREJ','Samsung GT4-7',NULL,'BNC_TEAM1','Samsung GT4-7','ZINTREC','TTN_HALTAREJ' UNION
SELECT '0016328223','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM','TTN_FU1','TTN_RDINGLI','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_RDINGLI' UNION
SELECT '0016328321','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_MSANTIAG' UNION
SELECT '0013993508','Aug 2 2014 12:00AM','ysun@hotmail.com','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','BN Products','ZINTREC','TTN_CGAITO' UNION
SELECT '0016321671','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MLAUDE' UNION
SELECT '0016322321','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail','1','0',NULL,'0016321671','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332827','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail','1','0',NULL,'0016321671','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_EMAGISTR','BN Products',NULL,'TTN_FU1','BN Products','ZINTREC','TTN_EMAGISTR' UNION
SELECT '0016332828','Jan 1 2015 12:00AM','ysun@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_EMAGISTR'
January 26, 2015 at 3:38 pm
Requested format below. I'm new to this, thanks for the lesson!
IF OBJECT_ID('TempDB..#CRMIRTest','U') IS NOT NULL
DROP TABLE #CRMIRTest
CREATE TABLE [#CRMIRTest] (
[IRNumber] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL Primary Key,
[IRDate] [datetime] NULL ,
[Email] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ChannelDesc] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[rc] [int] NULL ,
[dslc] [int] NULL ,
[HasRepeat] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[firstIR] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstChannel] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstContactDate] [datetime] NULL ,
[FirstOrg] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstAgent] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstLOB] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Invalid] [int] NULL ,
[ORGDesc] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Cat1Desc] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[StatusProfile] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CreatedBy] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]
GO
CREATE INDEX irdate ON #CRMIRTest(IRDate)
CREATE INDEX email ON #CRMIRTest (email)
CREATE INDEX rc ON #CRMIRTest (rc)
CREATE INDEX HasRepeat ON #CRMIRTest (HasRepeat)
CREATE INDEX firstIR ON #CRMIRTest (firstIR)
CREATE INDEX Invalid ON #CRMIRTest (Invalid)
CREATE INDEX StatusProfile ON #CRMIRTest (StatusProfile)
SET dateformat dmy
INSERT INTO #CRMIRTest
(IRNumber, IRDate, Email, ChannelDesc, rc, dslc, HasRepeat, firstIR, FirstChannel, FirstContactDate, FirstOrg, FirstAgent, FirstLOB, Invalid, ORGDesc, Cat1Desc, StatusProfile, CreatedBy)
SELECT '0012616700','May 1 2014 12:00AM','0920@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Returns','ZINTREC','TTN_IFELIX' UNION
SELECT '0012616701','May 1 2014 12:00AM','0920@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Returns','CRMACTIV','TTN_IFELIX' UNION
SELECT '0012627199','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_EMAGISTR',NULL,NULL,NULL,NULL,'ZINTREC','TTN_EMAGISTR' UNION
SELECT '0012627894','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_DESTRADA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_DESTRADA' UNION
SELECT '0012629234','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'WIL_JDALE',NULL,NULL,NULL,NULL,'ZINTREC','WIL_JDALE' UNION
SELECT '0012629632','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTC_RCABALLE',NULL,NULL,NULL,NULL,'ZINTREC','TTC_RCABALLE' UNION
SELECT '0012631852','May 1 2014 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0012616700','E-Mail','May 1 2014 12:00AM',NULL,'TTN_EFERNAND',NULL,NULL,NULL,NULL,'ZINTREC','TTN_EFERNAND' UNION
SELECT '0012632152','May 2 2014 12:00AM','0920@hotmail.com','E-Mail','1','1',NULL,'0012616700','E-Mail','May 2 2014 12:00AM','BNC_TEAM28','TTN_MMIRANDA','Digital Newstand',NULL,'BNC_TEAM28','Digital Newstand','ZINTREC','TTN_MMIRANDA' UNION
SELECT '0016322263','Jan 1 2015 12:00AM','0920@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016322875','Jan 1 2015 12:00AM','0920@hotmail.com','E-Mail','1','0',NULL,'0016322263','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_DPANLAQU','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016322876','Jan 1 2015 12:00AM','0920@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_DPANLAQU' UNION
SELECT '0016333108','Jan 2 2015 12:00AM','0920@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016333115','Jan 2 2015 12:00AM','0920@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016322033','Jan 1 2015 12:00AM','514@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','B&N Membership','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016347927','Jan 2 2015 12:00AM','514@gmail.com','E-Mail','1','1',NULL,'0016322033','E-Mail','Jan 2 2015 12:00AM','ARV_TEAM6','WIL_DLACY','B&N Membership',NULL,'ARV_TEAM6','B&N Membership','ZINTREC','WIL_DLACY' UNION
SELECT '0015220731','Oct 29 2014 12:00AM','accini@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'HHM_TEAM73','Non-Order Related Issues','ZINTREC','HHM_DSURIO' UNION
SELECT '0016321977','Jan 1 2015 12:00AM','accini@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Returns','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332451','Jan 1 2015 12:00AM','accini@gmail.com','E-Mail','1','0',NULL,'0016321977','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_MTAIPEN','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_MTAIPEN' UNION
SELECT '0016321858','Jan 1 2015 12:00AM','ames75@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332534','Jan 1 2015 12:00AM','ames75@gmail.com','E-Mail','1','0',NULL,'0016321858','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_ETEODOSI','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016321951','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Authentication','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322862','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail','1','0',NULL,'0016321951','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM50','TTN_MLAUDE','Client Apps',NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_MLAUDE' UNION
SELECT '0016324817','Jan 1 2015 12:00AM','amonday2@aol.com','E-Mail','1','0',NULL,'0016321951','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_IFELIX','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_IFELIX' UNION
SELECT '0016324818','Jan 1 2015 12:00AM','amonday2@aol.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_IFELIX' UNION
SELECT '0016332971','Jan 2 2015 12:00AM','amonday2@aol.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016321801','Jan 1 2015 12:00AM','an.gethin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Authentication','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016335396','Jan 2 2015 12:00AM','an.gethin@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016335564','Jan 2 2015 12:00AM','an.gethin@gmail.com','Telephone call','1','1',NULL,'0016321801','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016402188','Jan 6 2015 12:00AM','an.gethin@gmail.com','Telephone call','1','4',NULL,'0016321801','Telephone call','Jan 6 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016322242','Jan 1 2015 12:00AM','ank@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Third Party Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016393912','Jan 5 2015 12:00AM','ank@yahoo.com','E-Mail','1','4',NULL,'0016322242','E-Mail','Jan 5 2015 12:00AM','LYN_TEAM13','DNEIDHARDT','Third Party Products',NULL,'LYN_TEAM13','Third Party Products','ZINTREC','DNEIDHARDT' UNION
SELECT '0016322150','Jan 1 2015 12:00AM','atona@outlook.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_VDELOSAN' UNION
SELECT '0016322855','Jan 1 2015 12:00AM','atona@outlook.com','E-Mail','1','0',NULL,'0016322150','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_HSEBASTI','1st Edition',NULL,'LYN_TEAM4','1st Edition','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322856','Jan 1 2015 12:00AM','atona@outlook.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','1st Edition','CRMACTIV','TTN_HSEBASTI' UNION
SELECT '0016406767','Jan 6 2015 12:00AM','atona@outlook.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','MZAHLTEN' UNION
SELECT '0016587776','Jan 15 2015 12:00AM','atona@outlook.com','Chat','1','14',NULL,'0016322150','Chat','Jan 15 2015 12:00AM','BNC_TEAM1','TTN_DJALANDO','Client Apps',NULL,'BNC_TEAM1','Client Apps','ZINTREC','TTN_DJALANDO' UNION
SELECT '0016322198','Jan 1 2015 12:00AM','da.c.torres@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322830','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322835','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322847','Jan 1 2015 12:00AM','da.c.torres@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322943','Jan 1 2015 12:00AM','da.c.torres@gmail.com','E-Mail','1','0',NULL,'0016322198','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_LLABUTAP','1st Edition',NULL,NULL,'1st Edition','ZINTREC','TTN_LLABUTAP' UNION
SELECT '0016322009','Jan 1 2015 12:00AM','ddleton7122@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016541681','Jan 13 2015 12:00AM','ddleton7122@gmail.com','Telephone call','1','12',NULL,'0016322009','Telephone call','Jan 13 2015 12:00AM','HHM_TEAM21','HHM_AFROYALD',NULL,NULL,'HHM_TEAM21',NULL,'ZINTREC','HHM_AFROYALD' UNION
SELECT '0016321896','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322413','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','E-Mail','1','0',NULL,'0016321896','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM52','TTN_MMANDIN','BN Products',NULL,'BNC_TEAM52','BN Products','ZINTREC','TTN_MMANDIN' UNION
SELECT '0016322416','Jan 1 2015 12:00AM','dy.r.rucker@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MMANDIN' UNION
SELECT '0016321979','Jan 1 2015 12:00AM','emartin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Authentication','ZINTREC','TTN_AANIVES' UNION
SELECT '0016322221','Jan 1 2015 12:00AM','emartin@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016323032','Jan 1 2015 12:00AM','emartin@gmail.com','Telephone call','1','0',NULL,'0016321979','Telephone call','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016322174','Jan 1 2015 12:00AM','enfrost@msn.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016322819','Jan 1 2015 12:00AM','enfrost@msn.com','E-Mail','1','0',NULL,'0016322174','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_GPANGILI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_GPANGILI' UNION
SELECT '0016339675','Jan 2 2015 12:00AM','enfrost@msn.com','Telephone call','1','1',NULL,'0016322174','Telephone call','Jan 2 2015 12:00AM','BNC_TEAM55','TTG_ADELATOR','Payment',NULL,'BNC_TEAM55','Payment','ZINTREC','TTG_ADELATOR' UNION
SELECT '0004668977','Mar 13 2013 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','ACC_JZUNIGA' UNION
SELECT '0004671174','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM6','KNH_SAJJAMPU',NULL,NULL,'KNH_TEAM6',NULL,'ZINTREC','KNH_SAJJAMPU' UNION
SELECT '0004674533','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM3','KNH_RTHALLAP',NULL,NULL,'KNH_TEAM3',NULL,'ZINTREC','KNH_RTHALLAP' UNION
SELECT '0004678656','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM3','KNH_GRODDA',NULL,NULL,'KNH_TEAM3',NULL,'ZINTREC','KNH_GRODDA' UNION
SELECT '0004682262','Mar 13 2013 12:00AM','eod.eight@gmail.com','E-Mail','1','0',NULL,'0004668977','E-Mail','Mar 13 2013 12:00AM','KNH_TEAM6','KNH_NYALAMAN',NULL,NULL,'KNH_TEAM6',NULL,'ZINTREC','KNH_NYALAMAN' UNION
SELECT '0016321708','Jan 1 2015 12:00AM','eod.eight@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM5','Tablet','ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016419045','Jan 6 2015 12:00AM','eod.eight@gmail.com','E-Mail','1','5',NULL,'0016321708','E-Mail','Jan 6 2015 12:00AM','BNC_TEAM50','TTN_JVILLAFU','Tablet',NULL,'BNC_TEAM50','Tablet','ZINTREC','TTN_JVILLAFU' UNION
SELECT '0016479879','Jan 9 2015 12:00AM','eod.eight@gmail.com','Telephone call','1','3',NULL,'0016321708','Telephone call','Jan 9 2015 12:00AM',NULL,'TTN_CROSALES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_CROSALES' UNION
SELECT '0016495685','Jan 10 2015 12:00AM','eod.eight@gmail.com','Chat','1','1',NULL,'0016321708','Chat','Jan 10 2015 12:00AM','TTN_FU1','TTN_JDAEZ','1st Edition',NULL,'TTN_FU1','1st Edition','ZINTREC','TTN_JDAEZ' UNION
SELECT '0016495686','Jan 10 2015 12:00AM','eod.eight@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','1st Edition','CRMACTIV','TTN_JDAEZ' UNION
SELECT '0016516041','Jan 12 2015 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016516043','Jan 12 2015 12:00AM','eod.eight@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MYSANTOS' UNION
SELECT '0016322313','Jan 1 2015 12:00AM','ephdolan1@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016417949','Jan 6 2015 12:00AM','ephdolan1@gmail.com','Telephone call','1','5',NULL,'0016322313','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM2','TTN_KBAGAIN','Payment',NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016322265','Jan 1 2015 12:00AM','erervillemom@Yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM1','Authentication','ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016328941','Jan 1 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','0',NULL,'0016322265','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_MAGBANGL',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016333217','Jan 2 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','1',NULL,'0016322265','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016351870','Jan 3 2015 12:00AM','erervillemom@Yahoo.com','E-Mail','1','1',NULL,'0016322265','E-Mail','Jan 3 2015 12:00AM',NULL,'TTN_GPANGILI','Account Management',NULL,NULL,'Account Management','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016322208','Jan 1 2015 12:00AM','ewis2002@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MCANTOS' UNION
SELECT '0016322841','Jan 1 2015 12:00AM','ewis2002@yahoo.com','E-Mail','1','0',NULL,'0016322208','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_DPANLAQU',NULL,NULL,NULL,NULL,'ZINTREC','TTN_DPANLAQU' UNION
SELECT '0016324682','Jan 1 2015 12:00AM','ewis2002@yahoo.com','Chat','1','0',NULL,'0016322208','Chat','Jan 1 2015 12:00AM','BNC_TEAM29','TTN_ABERJA','Color',NULL,'BNC_TEAM29','Color','ZINTREC','TTN_ABERJA' UNION
SELECT '0016322210','Jan 1 2015 12:00AM','girl@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322499','Jan 1 2015 12:00AM','girl@gmail.com','E-Mail','1','0',NULL,'0016322210','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','BN Products',NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016488985','Jan 10 2015 12:00AM','girl@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MSOLSONA' UNION
SELECT '0016321706','Jan 1 2015 12:00AM','gosian.amber@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322347','Jan 1 2015 12:00AM','gosian.amber@aol.com','E-Mail','1','0',NULL,'0016321706','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_JALVAREZ','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0004182287','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM8',NULL,'ZINTREC','TTN_VSANTOS' UNION
SELECT '0004182369','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0004182287','Telephone call','Feb 18 2013 12:00AM','BNC_TEAM8','TTN_VSANTOS',NULL,NULL,'BNC_TEAM8',NULL,'ZINTREC','TTN_VSANTOS' UNION
SELECT '0004182744','Feb 18 2013 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0004182287','Telephone call','Feb 18 2013 12:00AM','LYN_TEAM4','WIL_BXEASTER','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','WIL_BXEASTER' UNION
SELECT '0004182745','Feb 18 2013 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','WIL_BXEASTER' UNION
SELECT '0004194344','Feb 19 2013 12:00AM','gsb@comcast.net','Telephone call','1','1',NULL,'0004182287','Telephone call','Feb 19 2013 12:00AM','LYN_TEAM4','WRODRIGUEZ','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','WRODRIGUEZ' UNION
SELECT '0004977611','Mar 29 2013 12:00AM','gsb@comcast.net','Telephone call','1','38',NULL,'0004182287','Telephone call','Mar 29 2013 12:00AM',NULL,'MPOLKOWSKA',NULL,NULL,NULL,NULL,'ZINTREC','MPOLKOWSKA' UNION
SELECT '0009247597','Nov 15 2013 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM29',NULL,'ZINTREC','TTN_RFLORES' UNION
SELECT '0010743585','Jan 13 2014 12:00AM','gsb@comcast.net','Chat','1','59',NULL,'0009247597','Chat','Jan 13 2014 12:00AM','TTN_FU1','TTN_UREJEI_3','Downloadable Products',NULL,'TTN_FU1','Downloadable Products','ZINTREC','TTN_UREJEI_3' UNION
SELECT '0010743586','Jan 13 2014 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Downloadable Products','CRMACTIV','TTN_UREJEI_3' UNION
SELECT '0010744259','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM','BNC_TEAM27','TTN_MSANJUAN','Downloadable Products',NULL,'BNC_TEAM27','Downloadable Products','ZINTREC','TTN_MSANJUAN' UNION
SELECT '0010744558','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM',NULL,'HHM_ABOLANOS',NULL,NULL,NULL,NULL,'ZINTREC','HHM_ABOLANOS' UNION
SELECT '0010744949','Jan 13 2014 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0009247597','Telephone call','Jan 13 2014 12:00AM','BNC_TEAM27','HHM_ABOLANOS','Downloadable Products',NULL,'BNC_TEAM27','Downloadable Products','ZINTREC','HHM_ABOLANOS' UNION
SELECT '0016321794','Jan 1 2015 12:00AM','gsb@comcast.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','ZINTREC','TTN_MLAUDE' UNION
SELECT '0016321831','Jan 1 2015 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','CRMACTIV','TTN_MLAUDE' UNION
SELECT '0016332755','Jan 1 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MALCANTA' UNION
SELECT '0016333235','Jan 2 2015 12:00AM','gsb@comcast.net','E-Mail','1','1',NULL,'0016321794','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_SMANIGBA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMANIGBA' UNION
SELECT '0016333818','Jan 2 2015 12:00AM','gsb@comcast.net','E-Mail','1','0',NULL,'0016321794','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016336801','Jan 2 2015 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0016321794','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016337066','Jan 2 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016362195','Jan 3 2015 12:00AM','gsb@comcast.net','E-Mail','1','1',NULL,'0016321794','E-Mail','Jan 3 2015 12:00AM','TTN_FU1','WIL_PLUURS2','Simple Touch',NULL,'TTN_FU1','Simple Touch','ZINTREC','WIL_PLUURS2' UNION
SELECT '0016379344','Jan 5 2015 12:00AM','gsb@comcast.net','E-Mail','1','2',NULL,'0016321794','E-Mail','Jan 5 2015 12:00AM','TTN_FU1','TTN_AANIVES','Simple Touch',NULL,'TTN_FU1','Simple Touch','ZINTREC','TTN_AANIVES' UNION
SELECT '0016379363','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016379371','Jan 5 2015 12:00AM','gsb@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Simple Touch','CRMACTIV','TTN_AANIVES' UNION
SELECT '0016379376','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call','1','0',NULL,'0016321794','Telephone call','Jan 5 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016401115','Jan 5 2015 12:00AM','gsb@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0001982338','Nov 29 2012 12:00AM','hbriggs@comcast.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_SUP1','BN Products','ZINTREC','WIL_DASKILDS' UNION
SELECT '0009773245','Dec 9 2013 12:00AM','hbriggs@comcast.net','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM6','BN Products','ZINTREC','WIL_KGOLDEN' UNION
SELECT '0009773246','Dec 9 2013 12:00AM','hbriggs@comcast.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM6','BN Products','CRMACTIV','WIL_KGOLDEN' UNION
SELECT '0011983639','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','HHM_MSANDIEG' UNION
SELECT '0011983653','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call','1','0',NULL,'0011983639','Telephone call','Mar 20 2014 12:00AM','HHM_TEAM30','HHM_MSALVADO','BN Products',NULL,'HHM_TEAM30','BN Products','ZINTREC','HHM_MSALVADO' UNION
SELECT '0011984891','Mar 20 2014 12:00AM','hbriggs@comcast.net','Telephone call','1','0',NULL,'0011983639','Telephone call','Mar 20 2014 12:00AM','HHM_TEAM73','HHM_MSANDIEG',NULL,NULL,'HHM_TEAM73',NULL,'ZINTREC','HHM_MSANDIEG' UNION
SELECT '0016321834','Jan 1 2015 12:00AM','hbriggs@comcast.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JONG' UNION
SELECT '0016328562','Jan 1 2015 12:00AM','hbriggs@comcast.net','E-Mail','1','0',NULL,'0016321834','E-Mail','Jan 1 2015 12:00AM',NULL,'EMCCASKILL',NULL,NULL,NULL,NULL,'ZINTREC','EMCCASKILL' UNION
SELECT '0009572285','Dec 1 2013 12:00AM','hjm@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM3','Payment','ZINTREC','KNH_VSIRIPAL' UNION
SELECT '0010089922','Dec 20 2013 12:00AM','hjm@gmail.com','Telephone call','1','19',NULL,'0009572285','Telephone call','Dec 20 2013 12:00AM','BNC_TEAM6','TTN_NTORRES',NULL,NULL,'BNC_TEAM6',NULL,'ZINTREC','TTN_NTORRES' UNION
SELECT '0011554696','Feb 24 2014 12:00AM','hjm@gmail.com','Chat',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM10','Nook Color','ZINTREC','TTN_MANDAL' UNION
SELECT '0016322191','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322412','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail','1','0',NULL,'0016322191','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016332562','Jan 1 2015 12:00AM','hjm@gmail.com','E-Mail','1','0',NULL,'0016322191','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_MMONTEMA','BN Products',NULL,'TTN_FU1','BN Products','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016332563','Jan 1 2015 12:00AM','hjm@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_MMONTEMA' UNION
SELECT '0013892891','Jul 25 2014 12:00AM','i.beaugelin@gmail.com','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM14','Third Party Products','ZINTREC','TTN_JVALDERA' UNION
SELECT '0016322269','Jan 1 2015 12:00AM','i.beaugelin@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JJULIAN' UNION
SELECT '0016322569','Jan 1 2015 12:00AM','i.beaugelin@gmail.com','E-Mail','1','0',NULL,'0016322269','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSANPEDR','Third Party Products',NULL,'BNC_TEAM46','Third Party Products','ZINTREC','TTN_MSANPEDR' UNION
SELECT '0009505578','Nov 28 2013 12:00AM','ier@multideck.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM14','BN Products','ZINTREC','TTN_DCOLLA_3' UNION
SELECT '0009883097','Dec 12 2013 12:00AM','ier@multideck.com','Telephone call','1','14',NULL,'0009505578','Telephone call','Dec 12 2013 12:00AM',NULL,'KNH_SJONNALA',NULL,NULL,NULL,NULL,'ZINTREC','KNH_SJONNALA' UNION
SELECT '0009883147','Dec 12 2013 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0009505578','Telephone call','Dec 12 2013 12:00AM',NULL,'KNH_SJONNALA',NULL,NULL,NULL,NULL,'ZINTREC','KNH_SJONNALA' UNION
SELECT '0011914548','Mar 16 2014 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_JALEJAND' UNION
SELECT '0011914624','Mar 16 2014 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0011914548','Telephone call','Mar 16 2014 12:00AM','TT_Team 1','TTN_JALEJAND',NULL,NULL,'TT_Team 1',NULL,'ZINTREC','TTN_JALEJAND' UNION
SELECT '0016322206','Jan 1 2015 12:00AM','ier@multideck.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_LGALANG' UNION
SELECT '0016322860','Jan 1 2015 12:00AM','ier@multideck.com','E-Mail','1','0',NULL,'0016322206','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_GPANGILI','1st Edition',NULL,NULL,'1st Edition','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016372626','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','3',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM','LYN_CSR25','TTN_EGUMASIN','Client Apps',NULL,'LYN_CSR25','Client Apps','ZINTREC','TTN_EGUMASIN' UNION
SELECT '0016372787','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'HHM_MXPASCUA',NULL,NULL,NULL,NULL,'ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016372891','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016372936','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'TTN_JCABRERA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JCABRERA' UNION
SELECT '0016372980','Jan 4 2015 12:00AM','ier@multideck.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_CSR25','Client Apps','CRMACTIV','HHM_MXPASCUA' UNION
SELECT '0016372983','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM','LYN_CSR25','HHM_MXPASCUA','Client Apps',NULL,'LYN_CSR25','Client Apps','ZINTREC','HHM_MXPASCUA' UNION
SELECT '0016373155','Jan 4 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 4 2015 12:00AM',NULL,'TTN_JCABRERA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JCABRERA' UNION
SELECT '0016403410','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','2',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM',NULL,'TTN_MSOLSONA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MSOLSONA' UNION
SELECT '0016414533','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','HHM_KBERMAS' UNION
SELECT '0016415078','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM',NULL,'TTG_DRODRIGU',NULL,NULL,NULL,NULL,'ZINTREC','TTG_DRODRIGU' UNION
SELECT '0016415125','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM54','TTG_DRODRIGU','HD',NULL,'BNC_TEAM54','HD','ZINTREC','TTG_DRODRIGU' UNION
SELECT '0016415400','Jan 6 2015 12:00AM','ier@multideck.com','Telephone call','1','0',NULL,'0016322206','Telephone call','Jan 6 2015 12:00AM','BNC_TEAM54','HHM_MPEARLY','HD',NULL,'BNC_TEAM54','HD','ZINTREC','HHM_MPEARLY' UNION
SELECT '0016493832','Jan 10 2015 12:00AM','ier@multideck.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','DNEWKIRK' UNION
SELECT '0016322159','Jan 1 2015 12:00AM','ilyncranmer@att.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016332486','Jan 1 2015 12:00AM','ilyncranmer@att.net','E-Mail','1','0',NULL,'0016322159','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM4','TTN_MAGUANZA','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_MAGUANZA' UNION
SELECT '0006854260','Jul 8 2013 12:00AM','ith020@sc.rr.com','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ACC_TEAM3',NULL,'ZINTREC','ACC_RLOAIZA' UNION
SELECT '0006854261','Jul 8 2013 12:00AM','ith020@sc.rr.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ACC_TEAM3',NULL,'CRMACTIV','ACC_RLOAIZA' UNION
SELECT '0006869057','Jul 9 2013 12:00AM','ith020@sc.rr.com','Telephone call','1','1',NULL,'0006854260','Telephone call','Jul 9 2013 12:00AM','HHM_TEAM44','HHM_CJOBETH','NOOK 1st Gen (wi-fi/3G)',NULL,'HHM_TEAM44','NOOK 1st Gen (wi-fi/3G)','ZINTREC','HHM_CJOBETH' UNION
SELECT '0007141009','Jul 24 2013 12:00AM','ith020@sc.rr.com','Telephone call','1','15',NULL,'0006854260','Telephone call','Jul 24 2013 12:00AM','ATX_TEAM7','ATX_KCASTRO',NULL,NULL,'ATX_TEAM7',NULL,'ZINTREC','ATX_KCASTRO' UNION
SELECT '0011368478','Feb 12 2014 12:00AM','ith020@sc.rr.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM1','Downloadable Products','ZINTREC','TTC_MINCIO_2' UNION
SELECT '0011369553','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM9','TTN_LROCO',NULL,NULL,'BNC_TEAM9',NULL,'ZINTREC','TTN_LROCO' UNION
SELECT '0011369692','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM50','TTN_CMASINDO',NULL,NULL,'BNC_TEAM50',NULL,'ZINTREC','TTN_CMASINDO' UNION
SELECT '0011370286','Feb 12 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Feb 12 2014 12:00AM','BNC_TEAM9','TTN_LROCO',NULL,NULL,'BNC_TEAM9',NULL,'ZINTREC','TTN_LROCO' UNION
SELECT '0011771856','Mar 7 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','23',NULL,'0011368478','Telephone call','Mar 7 2014 12:00AM','HHM_TEAM34','HHM_BVALIENT',NULL,NULL,'HHM_TEAM34',NULL,'ZINTREC','HHM_BVALIENT' UNION
SELECT '0011772394','Mar 7 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','0',NULL,'0011368478','Telephone call','Mar 7 2014 12:00AM',NULL,'HHM_LDIAZ',NULL,NULL,NULL,NULL,'ZINTREC','HHM_LDIAZ' UNION
SELECT '0011916545','Mar 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','10',NULL,'0011368478','E-Mail','Mar 17 2014 12:00AM','BNC_TEAM28','TTN_AANIVES','Downloadable Products',NULL,'BNC_TEAM28','Downloadable Products','ZINTREC','TTN_AANIVES' UNION
SELECT '0011916546','Mar 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','0',NULL,'0011368478','E-Mail','Mar 17 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0011934738','Mar 18 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','1',NULL,'0011368478','Telephone call','Mar 18 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0011970531','Mar 20 2014 12:00AM','ith020@sc.rr.com','Telephone call','1','2',NULL,'0011368478','Telephone call','Mar 20 2014 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0012423801','Apr 17 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','28',NULL,'0011368478','E-Mail','Apr 17 2014 12:00AM','BNC_TEAM4','TTN_DESTRADA',NULL,NULL,'BNC_TEAM4',NULL,'ZINTREC','TTN_DESTRADA' UNION
SELECT '0012430202','Apr 18 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','1',NULL,'0011368478','E-Mail','Apr 18 2014 12:00AM','BNC_TEAM50','TTN_RLLAVOR','Client Apps',NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_RLLAVOR' UNION
SELECT '0012866672','May 18 2014 12:00AM','ith020@sc.rr.com','E-Mail','1','30',NULL,'0011368478','E-Mail','May 18 2014 12:00AM','BNC_TEAM28','TTN_JZAMORA','Downloadable Products',NULL,'BNC_TEAM28','Downloadable Products','ZINTREC','TTN_JZAMORA' UNION
SELECT '0016322248','Jan 1 2015 12:00AM','ith020@sc.rr.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM8','Client Apps','ZINTREC','TTN_MEVARDON' UNION
SELECT '0016595318','Jan 15 2015 12:00AM','ith020@sc.rr.com','Chat','1','14',NULL,'0016322248','Chat','Jan 15 2015 12:00AM',NULL,'TTN_JJUTARA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JJUTARA' UNION
SELECT '0016322247','Jan 1 2015 12:00AM','ixn@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016332533','Jan 1 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_SMALLARI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMALLARI' UNION
SELECT '0016333580','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','1',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016333611','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016351353','Jan 2 2015 12:00AM','ixn@yahoo.com','E-Mail','1','0',NULL,'0016322247','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0002211463','Dec 7 2012 12:00AM','jim@frontiernet.net','Chat',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM6','Payment','ZINTREC','KNH_DREDDY' UNION
SELECT '0016321857','Jan 1 2015 12:00AM','jim@frontiernet.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016334521','Jan 2 2015 12:00AM','jim@frontiernet.net','E-Mail','1','1',NULL,'0016321857','E-Mail','Jan 2 2015 12:00AM','ARV_FU1','WIL_CVARONA','Account Management',NULL,'ARV_FU1','Account Management','ZINTREC','WIL_CVARONA' UNION
SELECT '0016322243','Jan 1 2015 12:00AM','kcpa@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_AANIVES' UNION
SELECT '0016329401','Jan 1 2015 12:00AM','kcpa@gmail.com','E-Mail','1','0',NULL,'0016322243','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM28','TTN_MAGBANGL','Client Apps',NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016332481','Jan 1 2015 12:00AM','kcpa@gmail.com','Telephone call','1','0',NULL,'0016322243','Telephone call','Jan 1 2015 12:00AM','BNC_TEAM28','TTN_AANIVES','Client Apps',NULL,'BNC_TEAM28','Client Apps','ZINTREC','TTN_AANIVES' UNION
SELECT '0016321818','Jan 1 2015 12:00AM','l@kerstin-foelting.de','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016366843','Jan 4 2015 12:00AM','l@kerstin-foelting.de','E-Mail','1','3',NULL,'0016321818','E-Mail','Jan 4 2015 12:00AM','ARV_TEAM7','WIL_CCATTNEL',NULL,NULL,'ARV_TEAM7',NULL,'ZINTREC','WIL_CCATTNEL' UNION
SELECT '0014770069','Sep 25 2014 12:00AM','l0kecky@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'HHM_TEAM8',NULL,'ZINTREC','HHM_JMONCATA' UNION
SELECT '0016321744','Jan 1 2015 12:00AM','l0kecky@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','B&N Membership','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0016332754','Jan 1 2015 12:00AM','l0kecky@gmail.com','E-Mail','1','0',NULL,'0016321744','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM4','TTN_RGABUY_2','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_RGABUY_2' UNION
SELECT '0016333246','Jan 2 2015 12:00AM','l0kecky@gmail.com','E-Mail','1','1',NULL,'0016321744','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM4','TTN_SDUNGCA','B&N Membership',NULL,'BNC_TEAM4','B&N Membership','ZINTREC','TTN_SDUNGCA' UNION
SELECT '0016446766','Jan 8 2015 12:00AM','l0kecky@gmail.com','Telephone call','1','6',NULL,'0016321744','Telephone call','Jan 8 2015 12:00AM',NULL,'TTN_RGABUY_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RGABUY_2' UNION
SELECT '0012162188','Apr 1 2014 12:00AM','leejhaught@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','Client Apps','ZINTREC','TTN_CGAITO' UNION
SELECT '0012462055','Apr 20 2014 12:00AM','leejhaught@gmail.com','E-Mail','1','19',NULL,'0012162188','E-Mail','Apr 20 2014 12:00AM',NULL,'TTN_RHICBA_3','Client Apps',NULL,NULL,'Client Apps','ZINTREC','TTN_RHICBA_3' UNION
SELECT '0016322278','Jan 1 2015 12:00AM','leejhaught@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM5','Client Apps','ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016516416','Jan 12 2015 12:00AM','leejhaught@gmail.com','E-Mail','1','11',NULL,'0016322278','E-Mail','Jan 12 2015 12:00AM',NULL,'TTN_JERESE','Client Apps',NULL,NULL,'Client Apps','ZINTREC','TTN_JERESE' UNION
SELECT '0016516802','Jan 12 2015 12:00AM','leejhaught@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_JERESE' UNION
SELECT '0016322279','Jan 1 2015 12:00AM','lerm2018@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_MAGUANZA' UNION
SELECT '0016332493','Jan 1 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','0',NULL,'0016322279','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_SDUNGCA','Authentication',NULL,'BNC_TEAM2','Authentication','ZINTREC','TTN_SDUNGCA' UNION
SELECT '0016351442','Jan 2 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','1',NULL,'0016322279','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_CGAITO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_CGAITO' UNION
SELECT '0016375754','Jan 4 2015 12:00AM','lerm2018@gmail.com','E-Mail','1','2',NULL,'0016322279','E-Mail','Jan 4 2015 12:00AM','BNC_TEAM2','WIL_RSUMMERS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','WIL_RSUMMERS' UNION
SELECT '0001439787','Nov 5 2012 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_TEAM6','Downloadable Products','ZINTREC','WIL_CTRIPLIN' UNION
SELECT '0001440751','Nov 5 2012 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0001439787','Telephone call','Nov 5 2012 12:00AM','HHM_TEAM32','HHM_LDIONA','Digital Newstand',NULL,'HHM_TEAM32','Digital Newstand','ZINTREC','HHM_LDIONA' UNION
SELECT '0003139294','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','ACC_RMORA' UNION
SELECT '0003139568','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0003139294','Telephone call','Jan 6 2013 12:00AM','ACC_TEAM1','ACC_RMORA',NULL,NULL,'ACC_TEAM1',NULL,'ZINTREC','ACC_RMORA' UNION
SELECT '0003140546','Jan 6 2013 12:00AM','lls@iocnet.net','Telephone call','1','0',NULL,'0003139294','Telephone call','Jan 6 2013 12:00AM','HHM_TEAM45','HHM_CAMEN','Digital Newstand',NULL,'HHM_TEAM45','Digital Newstand','ZINTREC','HHM_CAMEN' UNION
SELECT '0003955644','Feb 8 2013 12:00AM','lls@iocnet.net','Telephone call','1','33',NULL,'0003139294','Telephone call','Feb 8 2013 12:00AM','ARV_TEAM6','WIL_CBALL','BN Products',NULL,'ARV_TEAM6','BN Products','ZINTREC','WIL_CBALL' UNION
SELECT '0004229236','Feb 20 2013 12:00AM','lls@iocnet.net','Telephone call','1','12',NULL,'0003139294','Telephone call','Feb 20 2013 12:00AM','HHM_TEAM35','HHM_KCORUNA','Digital Newstand',NULL,'HHM_TEAM35','Digital Newstand','ZINTREC','HHM_KCORUNA' UNION
SELECT '0007698768','Aug 24 2013 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM7',NULL,'ZINTREC','TTN_EGUMASIN' UNION
SELECT '0007896676','Sep 3 2013 12:00AM','lls@iocnet.net','Telephone call','1','10',NULL,'0007698768','Telephone call','Sep 3 2013 12:00AM','BNC_TEAM29','TTN_FBASILIO',NULL,NULL,'BNC_TEAM29',NULL,'ZINTREC','TTN_FBASILIO' UNION
SELECT '0008986057','Nov 1 2013 12:00AM','lls@iocnet.net','Chat','1','59',NULL,'0007698768','Chat','Nov 1 2013 12:00AM','KNH_TEAM8','KNH_PVADICHA',NULL,NULL,'KNH_TEAM8',NULL,'ZINTREC','KNH_PVADICHA' UNION
SELECT '0009001670','Nov 1 2013 12:00AM','lls@iocnet.net','Chat','1','0',NULL,'0007698768','Chat','Nov 1 2013 12:00AM','BNC_TEAM11','TTN_LMEDINA','Downloadable Products',NULL,'BNC_TEAM11','Downloadable Products','ZINTREC','TTN_LMEDINA' UNION
SELECT '0016321699','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322411','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail','1','0',NULL,'0016321699','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016322791','Jan 1 2015 12:00AM','lls@iocnet.net','E-Mail','1','0',NULL,'0016321699','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_AANIVES',NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016332558','Jan 1 2015 12:00AM','lls@iocnet.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0016321786','Jan 1 2015 12:00AM','lmagner@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM28','Authentication','ZINTREC','TTN_ARONCALE' UNION
SELECT '0016345049','Jan 2 2015 12:00AM','lmagner@gmail.com','E-Mail','1','1',NULL,'0016321786','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM50','TTN_PTAMAYO','Simple Touch',NULL,'BNC_TEAM50','Simple Touch','ZINTREC','TTN_PTAMAYO' UNION
SELECT '0016322250','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_JALVAREZ' UNION
SELECT '0016322544','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_MSUGANOB','BN Products',NULL,'BNC_TEAM46','BN Products','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016322547','Jan 1 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_ETEODOSI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016333278','Jan 2 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','1',NULL,'0016322250','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016333408','Jan 2 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','0',NULL,'0016322250','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_MMADO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MMADO' UNION
SELECT '0016359754','Jan 3 2015 12:00AM','mi.hughes@gmail.com','E-Mail','1','1',NULL,'0016322250','E-Mail','Jan 3 2015 12:00AM','BNC_TEAM2','WIL_PLUURS2','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','WIL_PLUURS2' UNION
SELECT '0015000033','Oct 13 2014 12:00AM','milov@gmu.edu','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM3','B&N Membership','ZINTREC','TTN_JBALILLA' UNION
SELECT '0015097746','Oct 20 2014 12:00AM','milov@gmu.edu','E-Mail','1','7',NULL,'0015000033','E-Mail','Oct 20 2014 12:00AM','ARV_FU1','WIL_NBASDEO','BN Products',NULL,'ARV_FU1','BN Products','ZINTREC','WIL_NBASDEO' UNION
SELECT '0015097954','Oct 20 2014 12:00AM','milov@gmu.edu','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_FU1','BN Products','CRMACTIV','WIL_NBASDEO' UNION
SELECT '0015097956','Oct 20 2014 12:00AM','milov@gmu.edu','Telephone call','1','0',NULL,'0015000033','Telephone call','Oct 20 2014 12:00AM','ARV_FU1','WIL_NBASDEO','BN Products',NULL,'ARV_FU1','BN Products','ZINTREC','WIL_NBASDEO' UNION
SELECT '0016321854','Jan 1 2015 12:00AM','milov@gmu.edu','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Promotions & Coupons','ZINTREC','TTN_MSANPEDR' UNION
SELECT '0016423855','Jan 7 2015 12:00AM','milov@gmu.edu','E-Mail','1','6',NULL,'0016321854','E-Mail','Jan 7 2015 12:00AM','BNC_TEAM52','TTN_MMANDIN','Third Party Products',NULL,'BNC_TEAM52','Third Party Products','ZINTREC','TTN_MMANDIN' UNION
SELECT '0016423928','Jan 7 2015 12:00AM','milov@gmu.edu','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_MMANDIN' UNION
SELECT '0016322303','Jan 1 2015 12:00AM','nabasgrif@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_RPRICE' UNION
SELECT '0016332714','Jan 1 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','0',NULL,'0016322303','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_SMALLARI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_SMALLARI' UNION
SELECT '0016333657','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','1',NULL,'0016322303','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_RMARQUEZ',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RMARQUEZ' UNION
SELECT '0016333698','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','E-Mail','1','0',NULL,'0016322303','E-Mail','Jan 2 2015 12:00AM',NULL,'TTN_KEJANDA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KEJANDA' UNION
SELECT '0016333924','Jan 2 2015 12:00AM','nabasgrif@yahoo.com','Telephone call','1','0',NULL,'0016322303','Telephone call','Jan 2 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016352765','Jan 3 2015 12:00AM','nabasgrif@yahoo.com','Telephone call','1','1',NULL,'0016322303','Telephone call','Jan 3 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_KEJANDA' UNION
SELECT '0009949687','Dec 15 2013 12:00AM','neece@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_AANIVES' UNION
SELECT '0009950063','Dec 15 2013 12:00AM','neece@gmail.com','E-Mail','1','0',NULL,'0009949687','E-Mail','Dec 15 2013 12:00AM','BNC_TEAM50','TTN_HSEBASTI','Downloadable Products',NULL,'BNC_TEAM50','Downloadable Products','ZINTREC','TTN_HSEBASTI' UNION
SELECT '0016322257','Jan 1 2015 12:00AM','neece@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','Non-Order Related Issues','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016333169','Jan 2 2015 12:00AM','neece@gmail.com','E-Mail','1','1',NULL,'0016322257','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','Payment',NULL,'BNC_TEAM2','Payment','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016321689','Jan 1 2015 12:00AM','odynelson@bresnan.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016378823','Jan 5 2015 12:00AM','odynelson@bresnan.net','Telephone call','1','4',NULL,'0016321689','Telephone call','Jan 5 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016515135','Jan 12 2015 12:00AM','odynelson@bresnan.net','Telephone call','1','7',NULL,'0016321689','Telephone call','Jan 12 2015 12:00AM',NULL,'TTN_ETEODOSI',NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016322273','Jan 1 2015 12:00AM','onley817@gmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM53','Authentication','ZINTREC','TTN_MALCANTA' UNION
SELECT '0016323668','Jan 1 2015 12:00AM','onley817@gmail.com','E-Mail','1','0',NULL,'0016322273','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM53','TTN_MAGBANGL','HD+',NULL,'BNC_TEAM53','HD+','ZINTREC','TTN_MAGBANGL' UNION
SELECT '0016323669','Jan 1 2015 12:00AM','onley817@gmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','HD+','CRMACTIV','TTN_MAGBANGL' UNION
SELECT '0016334754','Jan 2 2015 12:00AM','onley817@gmail.com','Telephone call','1','1',NULL,'0016322273','Telephone call','Jan 2 2015 12:00AM',NULL,'TTN_KBAGAIN',NULL,NULL,NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016334757','Jan 2 2015 12:00AM','onley817@gmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','TTN_KBAGAIN' UNION
SELECT '0016321829','Jan 1 2015 12:00AM','pson@gipsonbearing.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','ZINTREC','TTN_VDELOSAN' UNION
SELECT '0016321830','Jan 1 2015 12:00AM','pson@gipsonbearing.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_VDELOSAN' UNION
SELECT '0016333023','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','1',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016333372','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','0',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_KANONUEV','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016351401','Jan 2 2015 12:00AM','pson@gipsonbearing.com','E-Mail','1','0',NULL,'0016321829','E-Mail','Jan 2 2015 12:00AM','BNC_TEAM2','TTN_ETEODOSI','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016417400','Jan 6 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','4',NULL,'0016321829','Telephone call','Jan 6 2015 12:00AM',NULL,'HHM_RSUAREZ',NULL,NULL,NULL,NULL,'ZINTREC','HHM_RSUAREZ' UNION
SELECT '0016420990','Jan 6 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','0',NULL,'0016321829','Telephone call','Jan 6 2015 12:00AM','HHM_TEAM35','HHM_RSUAREZ',NULL,NULL,'HHM_TEAM35',NULL,'ZINTREC','HHM_RSUAREZ' UNION
SELECT '0016502804','Jan 11 2015 12:00AM','pson@gipsonbearing.com','Telephone call','1','5',NULL,'0016321829','Telephone call','Jan 11 2015 12:00AM',NULL,'TTN_FORACION',NULL,NULL,NULL,NULL,'ZINTREC','TTN_FORACION' UNION
SELECT '0016321690','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MMONTEMA' UNION
SELECT '0016322435','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','E-Mail','1','0',NULL,'0016321690','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_AGRAFIL','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322436','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_AGRAFIL' UNION
SELECT '0016322467','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_AGRAFIL' UNION
SELECT '0016322473','Jan 1 2015 12:00AM','rles.kittrell@sbcglobal.net','Telephone call','1','0',NULL,'0016321690','Telephone call','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_AGRAFIL','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_AGRAFIL' UNION
SELECT '0016322015','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_GPANGILI' UNION
SELECT '0016322409','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail','1','0',NULL,'0016322015','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_JBALOGNA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_JBALOGNA' UNION
SELECT '0016322557','Jan 1 2015 12:00AM','rrizales@weinsteinproperties.com','E-Mail','1','0',NULL,'0016322015','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_VDELOSAN','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_VDELOSAN' UNION
SELECT '0005027950','Apr 1 2013 12:00AM','tm2@bellsouth.net','Telephone call',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ARV_FU1',NULL,'ZINTREC','WIL_FALLEN' UNION
SELECT '0005188148','Apr 10 2013 12:00AM','tm2@bellsouth.net','Telephone call','1','9',NULL,'0005027950','Telephone call','Apr 10 2013 12:00AM',NULL,'WIL_FALLEN',NULL,NULL,NULL,NULL,'ZINTREC','WIL_FALLEN' UNION
SELECT '0016321965','Jan 1 2015 12:00AM','tm2@bellsouth.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_MSUGANOB' UNION
SELECT '0016332503','Jan 1 2015 12:00AM','tm2@bellsouth.net','E-Mail','1','0',NULL,'0016321965','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_RPRICE','B&N Membership',NULL,'BNC_TEAM46','B&N Membership','ZINTREC','TTN_RPRICE' UNION
SELECT '0016351840','Jan 3 2015 12:00AM','tm2@bellsouth.net','E-Mail','1','2',NULL,'0016321965','E-Mail','Jan 3 2015 12:00AM','TTN_FU1','TTN_MTAIPEN','B&N Membership',NULL,'TTN_FU1','B&N Membership','ZINTREC','TTN_MTAIPEN' UNION
SELECT '0016351841','Jan 3 2015 12:00AM','tm2@bellsouth.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','B&N Membership','CRMACTIV','TTN_MTAIPEN' UNION
SELECT '0011897010','Mar 15 2014 12:00AM','trozzi@verizon.net','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Account Management','ZINTREC','TTN_RGUIBAN' UNION
SELECT '0011897011','Mar 15 2014 12:00AM','trozzi@verizon.net','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Account Management','CRMACTIV','TTN_RGUIBAN' UNION
SELECT '0016322176','Jan 1 2015 12:00AM','trozzi@verizon.net','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ETEODOSI' UNION
SELECT '0016322839','Jan 1 2015 12:00AM','trozzi@verizon.net','E-Mail','1','0',NULL,'0016322176','E-Mail','Jan 1 2015 12:00AM',NULL,'TTN_MBUAN_2',NULL,NULL,NULL,NULL,'ZINTREC','TTN_MBUAN_2' UNION
SELECT '0016561654','Jan 14 2015 12:00AM','trozzi@verizon.net','E-Mail','1','13',NULL,'0016322176','E-Mail','Jan 14 2015 12:00AM','BNC_TEAM53','TTN_MALCANTA','Client Apps',NULL,'BNC_TEAM53','Client Apps','ZINTREC','TTN_MALCANTA' UNION
SELECT '0016321816','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_ARONCALE' UNION
SELECT '0016322346','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail','1','0',NULL,'0016321816','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM46','TTN_KEJANDA','Authentication',NULL,'BNC_TEAM46','Authentication','ZINTREC','TTN_KEJANDA' UNION
SELECT '0016332653','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','E-Mail','1','0',NULL,'0016321816','E-Mail','Jan 1 2015 12:00AM','LYN_TEAM4','TTN_KANONUEV','BN Products',NULL,'LYN_TEAM4','BN Products','ZINTREC','TTN_KANONUEV' UNION
SELECT '0016332654','Jan 1 2015 12:00AM','ttanyncox@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'LYN_TEAM4','BN Products','CRMACTIV','TTN_KANONUEV' UNION
SELECT '0016389321','Jan 5 2015 12:00AM','ttanyncox@hotmail.com','Telephone call',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'ZINTREC','NNADIR' UNION
SELECT '0016322240','Jan 1 2015 12:00AM','unt@aol.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_RPRICE' UNION
SELECT '0016334817','Jan 2 2015 12:00AM','unt@aol.com','E-Mail','1','1',NULL,'0016322240','E-Mail','Jan 2 2015 12:00AM','ARV_TEAM1','WIL_PLUURS2','Samsung GT4-7',NULL,'ARV_TEAM1','Samsung GT4-7','ZINTREC','WIL_PLUURS2' UNION
SELECT '0003224724','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Chat',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'KNH_TEAM1',NULL,'ZINTREC','KNH_NKPADM_2' UNION
SELECT '0003227956','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM','BNC_TEAM30','TTN_RCUENO','Nook Color',NULL,'BNC_TEAM30','Nook Color','ZINTREC','TTN_RCUENO' UNION
SELECT '0003227961','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0003224724','Chat','Jan 9 2013 12:00AM','BNC_TEAM31','TTN_LMENESES','Nook Color',NULL,'BNC_TEAM31','Nook Color','ZINTREC','TTN_LMENESES' UNION
SELECT '0003228053','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM',NULL,'TTN_RCUENO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RCUENO' UNION
SELECT '0003228416','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM','BNC_TEAM30','HHM_MSALES','Nook Color',NULL,'BNC_TEAM30','Nook Color','ZINTREC','HHM_MSALES' UNION
SELECT '0003228610','Jan 9 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 9 2013 12:00AM',NULL,'TTN_RCUENO',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RCUENO' UNION
SELECT '0003394677','Jan 15 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','6',NULL,'0003224724','Telephone call','Jan 15 2013 12:00AM',NULL,'TTN_UREJEINA','Returns',NULL,NULL,'Returns','ZINTREC','TTN_UREJEINA' UNION
SELECT '0003394895','Jan 15 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 15 2013 12:00AM',NULL,'HHM_JFADERAN','Returns',NULL,NULL,'Returns','ZINTREC','HHM_JFADERAN' UNION
SELECT '0003564291','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','7',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM','BNC_TEAM26','TTC_MTAJONER','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','TTC_MTAJONER' UNION
SELECT '0003565813','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM',NULL,'HHM_HDELACRU',NULL,NULL,NULL,NULL,'ZINTREC','HHM_HDELACRU' UNION
SELECT '0003569818','Jan 22 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','0',NULL,'0003224724','Telephone call','Jan 22 2013 12:00AM','BNC_TEAM26','HHM_HDELACRU','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','HHM_HDELACRU' UNION
SELECT '0003811315','Feb 1 2013 12:00AM','utifulone120@yahoo.com','Telephone call','1','10',NULL,'0003224724','Telephone call','Feb 1 2013 12:00AM','BNC_TEAM26','ERAMOS','NOOK ereader',NULL,'BNC_TEAM26','NOOK ereader','ZINTREC','ERAMOS' UNION
SELECT '0005038725','Apr 1 2013 12:00AM','utifulone120@yahoo.com','Chat','1','59',NULL,'0003224724','Chat','Apr 1 2013 12:00AM','BNC_TEAM1','TTN_MSAMUL_2','Downloadable Products',NULL,'BNC_TEAM1','Downloadable Products','ZINTREC','TTN_MSAMUL_2' UNION
SELECT '0016322239','Jan 1 2015 12:00AM','utifulone120@yahoo.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Authentication','ZINTREC','TTN_GPANGILI' UNION
SELECT '0016328017','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM',NULL,'TTN_RVISTA',NULL,NULL,NULL,NULL,'ZINTREC','TTN_RVISTA' UNION
SELECT '0016328057','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM',NULL,'TTC_CRAVALO',NULL,NULL,NULL,NULL,'ZINTREC','TTC_CRAVALO' UNION
SELECT '0016328168','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM','BNC_TEAM1','TTN_HALTAREJ','Samsung GT4-7',NULL,'BNC_TEAM1','Samsung GT4-7','ZINTREC','TTN_HALTAREJ' UNION
SELECT '0016328223','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Chat','1','0',NULL,'0016322239','Chat','Jan 1 2015 12:00AM','TTN_FU1','TTN_RDINGLI','Client Apps',NULL,'TTN_FU1','Client Apps','ZINTREC','TTN_RDINGLI' UNION
SELECT '0016328321','Jan 1 2015 12:00AM','utifulone120@yahoo.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','Client Apps','CRMACTIV','TTN_MSANTIAG' UNION
SELECT '0013993508','Aug 2 2014 12:00AM','ysun@hotmail.com','E-Mail',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'BNC_TEAM50','BN Products','ZINTREC','TTN_CGAITO' UNION
SELECT '0016321671','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail',NULL,NULL,'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ZINTREC','TTN_MLAUDE' UNION
SELECT '0016322321','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail','1','0',NULL,'0016321671','E-Mail','Jan 1 2015 12:00AM','BNC_TEAM2','TTN_MCANTOS','BN Products',NULL,'BNC_TEAM2','BN Products','ZINTREC','TTN_MCANTOS' UNION
SELECT '0016332827','Jan 1 2015 12:00AM','ysun@hotmail.com','E-Mail','1','0',NULL,'0016321671','E-Mail','Jan 1 2015 12:00AM','TTN_FU1','TTN_EMAGISTR','BN Products',NULL,'TTN_FU1','BN Products','ZINTREC','TTN_EMAGISTR' UNION
SELECT '0016332828','Jan 1 2015 12:00AM','ysun@hotmail.com','Task',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'TTN_FU1','BN Products','CRMACTIV','TTN_EMAGISTR'
January 26, 2015 at 10:13 pm
Details are in the code...
--===== Conditionally drop the working table to make reruns in SSMS easier
IF OBJECT_ID('tempdb..#QU','U') IS NOT NULL
DROP TABLE #QU
;
--===== Populate the working table with just enough data to get the job done.
-- We're setting up for a "data smear".
SELECT RowNum = IDENTITY(INT,1,1)
,Email = ISNULL(Email,'')
,HasRepeat = CONVERT(CHAR(1),NULL)
,IRNumber = ISNULL(IRNumber,'')
,RC
,FirstIR = CONVERT(VARCHAR(10),NULL)
INTO #QU
FROM #CRMIRTest
WHERE Email IS NOT NULL
AND StatusProfile = 'ZINTREC'
AND Invalid IS NULL
ORDER BY Email,IRNumber
OPTION (MAXDOP 1)
;
--===== Add the quintessential Clustered Index.
ALTER TABLE #QU
ADD PRIMARY KEY CLUSTERED (RowNum) WITH FILLFACTOR = 100
;
--===== Add an index that we'll need for the final update to keep a SORT from happening
-- for the MERGE JOIN that occurs.
CREATE UNIQUE INDEX AK_#QU_IRNumber ON #QU (IRNumber)
INCLUDE (FirstIR,HasRepeat)
;
--===== Add another index that we'll need for determining the values of "HasRepeat".
CREATE INDEX AK_#QU_FirstIR ON #QU (FirstIR)
;
--===== Declare some obviously name variables.
DECLARE @SafetyCounter INT
,@FirstIR VARCHAR(10)
;
--===== Start the safety counter for the first RowNum
SELECT @SafetyCounter = 1
;
--===== Do the "data smear" using a high performance pseudo-cursor known as a "Quirky Update"
UPDATE tgt
SET @FirstIR = FirstIR = CASE WHEN RC = 1 THEN @FirstIR ELSE IRNumber END
,@SafetyCounter = CASE WHEN RowNum = @SafetyCounter THEN @SafetyCounter + 1 ELSE 'Safety Counter Failed' END
FROM #QU tgt WITH(TABLOCKX,INDEX(1))
OPTION (MAXDOP 1)
;
--===== Upate all of the "starter rows" with the correct value for HasRepeat and set the FirstIR back to Null
UPDATE tgt
SET HasRepeat = (SELECT NULLIF(SIGN(COUNT(*)-1),0) FROM #QU qu WHERE qu.FirstIR = tgt.FirstIR)
,FirstIR = NULL
FROM #QU tgt
WHERE RC IS NULL
;
--===== Using the data from the "data smear", update the original table along with the duplication
-- of data in the original code. I don't believe the data duplication is actually correct because
-- of what these columns are named but that's what you had in the original code. If they're meant
-- to reflect whats in the FirstIR row, post back and we'll make changes to the "Quriky Update"
-- to fix that.
UPDATE tgt
SET FirstIR = qu.FirstIR
,HasRepeat = qu.HasRepeat
,FirstChannel = tgt.ChannelDesc
,FirstContactDate = tgt.IRDate
,FirstOrg = tgt.OrgDesc
,FirstAgent = tgt.CreatedBy
,FirstLOB = tgt.Cat1desc
FROM #CRMIRTEST tgt
JOIN #QU qu
ON tgt.IRNumber = qu.IRNumber
;
--Jeff Moden
Change is inevitable... Change for the better is not.
January 27, 2015 at 1:57 am
Jeff Moden (1/26/2015)
Details are in the code...
--===== Conditionally drop the working table to make reruns in SSMS easier
IF OBJECT_ID('tempdb..#QU','U') IS NOT NULL
DROP TABLE #QU
;
--===== Populate the working table with just enough data to get the job done.
-- We're setting up for a "data smear".
SELECT RowNum = IDENTITY(INT,1,1)
,Email = ISNULL(Email,'')
,HasRepeat = CONVERT(CHAR(1),NULL)
,IRNumber = ISNULL(IRNumber,'')
,RC
,FirstIR = CONVERT(VARCHAR(10),NULL)
INTO #QU
FROM #CRMIRTest
WHERE Email IS NOT NULL
AND StatusProfile = 'ZINTREC'
AND Invalid IS NULL
ORDER BY Email,IRNumber
OPTION (MAXDOP 1)
;
--===== Add the quintessential Clustered Index.
ALTER TABLE #QU
ADD PRIMARY KEY CLUSTERED (RowNum) WITH FILLFACTOR = 100
;
--===== Add an index that we'll need for the final update to keep a SORT from happening
-- for the MERGE JOIN that occurs.
CREATE UNIQUE INDEX AK_#QU_IRNumber ON #QU (IRNumber)
INCLUDE (FirstIR,HasRepeat)
;
--===== Add another index that we'll need for determining the values of "HasRepeat".
CREATE INDEX AK_#QU_FirstIR ON #QU (FirstIR)
;
--===== Declare some obviously name variables.
DECLARE @SafetyCounter INT
,@FirstIR VARCHAR(10)
;
--===== Start the safety counter for the first RowNum
SELECT @SafetyCounter = 1
;
--===== Do the "data smear" using a high performance pseudo-cursor known as a "Quirky Update"
UPDATE tgt
SET @FirstIR = FirstIR = CASE WHEN RC = 1 THEN @FirstIR ELSE IRNumber END
,@SafetyCounter = CASE WHEN RowNum = @SafetyCounter THEN @SafetyCounter + 1 ELSE 'Safety Counter Failed' END
FROM #QU tgt WITH(TABLOCKX,INDEX(1))
OPTION (MAXDOP 1)
;
--===== Upate all of the "starter rows" with the correct value for HasRepeat and set the FirstIR back to Null
UPDATE tgt
SET HasRepeat = (SELECT NULLIF(SIGN(COUNT(*)-1),0) FROM #QU qu WHERE qu.FirstIR = tgt.FirstIR)
,FirstIR = NULL
FROM #QU tgt
WHERE RC IS NULL
;
--===== Using the data from the "data smear", update the original table along with the duplication
-- of data in the original code. I don't believe the data duplication is actually correct because
-- of what these columns are named but that's what you had in the original code. If they're meant
-- to reflect whats in the FirstIR row, post back and we'll make changes to the "Quriky Update"
-- to fix that.
UPDATE tgt
SET FirstIR = qu.FirstIR
,HasRepeat = qu.HasRepeat
,FirstChannel = tgt.ChannelDesc
,FirstContactDate = tgt.IRDate
,FirstOrg = tgt.OrgDesc
,FirstAgent = tgt.CreatedBy
,FirstLOB = tgt.Cat1desc
FROM #CRMIRTEST tgt
JOIN #QU qu
ON tgt.IRNumber = qu.IRNumber
;
This is a fantastic example of how much SQL Server has improved, all we need to do to solve this with current versions is update a ROW_NUMBERed CTE.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
January 28, 2015 at 9:31 am
Hi Jeff,
You are correct, The channel, org, date, agent and LOB are all supposed to be that of the FirstIR. Outside of that, this is perfect. I'm learning a lot from this. Changes are appreciated.
--===== Using the data from the "data smear", update the original table along with the duplication
-- of data in the original code. I don't believe the data duplication is actually correct because
-- of what these columns are named but that's what you had in the original code. If they're meant
-- to reflect whats in the FirstIR row, post back and we'll make changes to the "Quriky Update"
-- to fix that.
UPDATE tgt
SET FirstIR = qu.FirstIR
,HasRepeat = qu.HasRepeat
,FirstChannel = tgt.ChannelDesc
,FirstContactDate = tgt.IRDate
,FirstOrg = tgt.OrgDesc
,FirstAgent = tgt.CreatedBy
,FirstLOB = tgt.Cat1desc
FROM #CRMIRTEST tgt
JOIN #QU qu
ON tgt.IRNumber = qu.IRNumber
;
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply