Is there a column limit for CSV files created from a DTS?
I have a request from a user to gather information for the employee and family medical information. The amount of dependent can be up to eight with information for each dependent.
I have crerated a tabel for the employee information and for each dependent to eight. I then insert the information into the tables and extract it using the DTS.
It executes using the DTS but when I look at the Destination tab and Transformation tab they are blank and I get the error for removing unmatched transformations.
It still runs but I do not see the column information in the two tabs.
Is this something Microsoft has built in?
Thank you,
TomR100
Here is my code:
SELECT DISTINCT
EMP.EMPLOYEE,
LAST_NAME,
FIRST_NAME,
MIDDLE_INIT,
HOME_PHONE,
ADDR1,
ADDR2,
CITY,
STATE,
ZIP,
SSN,
DOB,
SEX,
MARITAL_STAT,
TERMINAL,
DATE_HIRED,
START_DATE,
STOP_DATE,
COV_OPTION,
SP_EMP_NAME,
SP_EMP_PHONE,
SP_EMP_ADDR1,
SP_EMP_ADDR2,
SP_EMP_CITY,
SP_EMP_STATE,
SP_EMP_ZIP,
ISNULL(DEP1.DEP1_INS_CO_NAME,' ')AS EP1_INS_CO_NAME,
ISNULL(DEP1.DEP1_INS_CO_ADDR1,' ')AS
DEP1_INS_CO_ADDR1,
ISNULL(DEP1.DEP1_INS_CO_ADDR2,' ')AS
DEP1_INS_CO_ADDR2,
ISNULL(DEP1.DEP1_INS_CO_CITY,' ')AS
DEP1_INS_CO_CITY,
ISNULL(DEP1.DEP1_INS_CO_STATE,' ')AS
DEP1_INS_CO_STATE,
ISNULL(DEP1.DEP1_INS_CO_ZIP,' ')AS DEP1_INS_CO_ZIP,
ISNULL(DEP1.DEP1_FNAME,' ') AS DEP1_FNAME,
ISNULL(DEP1.DEP1_LNAME,' ') AS DEP1_LNAME,
ISNULL(DEP1.DEP1_SSN,' ') AS DEP1_SSN,
ISNULL(DEP1.DEP1_DOB,' ') AS DEP1_DOB,
ISNULL(DEP1.DEP1_REL_CODE,' ') AS DEP1_REL_CODE,
ISNULL(DEP1.DEP1_SEX,' ') AS DEP1_SEX,
ISNULL(DEP1.DEP1_STUDENT,' ') AS DEP1_STUDENT,
ISNULL(DEP1.DEP1_START_DATE,' ') AS DEP1_START_DATE,
ISNULL(DEP1.DEP1_STOP_DATE,' ') AS DEP1_STOP_DATE,
ISNULL(DEP2.DEP2_INS_CO_NAME,' ')AS EP2_INS_CO_NAME,
ISNULL(DEP2.DEP2_INS_CO_ADDR1,' ')AS
DEP2_INS_CO_ADDR1,
ISNULL(DEP2.DEP2_INS_CO_ADDR2,' ')AS
DEP2_INS_CO_ADDR2,
ISNULL(DEP2.DEP2_INS_CO_CITY,' ')AS
DEP2_INS_CO_CITY,
ISNULL(DEP2.DEP2_INS_CO_STATE,' ')AS DEP2_INS_CO_STATE,
ISNULL(DEP2.DEP2_INS_CO_ZIP,' ')AS DEP2_INS_CO_ZIP,
ISNULL(DEP2.DEP2_FNAME,' ') AS DEP2_FNAME,
ISNULL(DEP2.DEP2_LNAME,' ') AS DEP2_LNAME,
ISNULL(DEP2.DEP2_SSN,' ') AS DEP2_SSN,
ISNULL(DEP2.DEP2_DOB,' ') AS DEP2_DOB,
ISNULL(DEP2.DEP2_REL_CODE,' ') AS DEP2_REL_CODE,
ISNULL(DEP2.DEP2_SEX,' ') AS DEP2_SEX,
ISNULL(DEP2.DEP2_STUDENT,' ') AS DEP2_STUDENT,
ISNULL(DEP2.DEP2_START_DATE,' ') AS DEP2_START_DATE,
ISNULL(DEP2.DEP2_STOP_DATE,' ') AS DEP2_STOP_DATE,
ISNULL(DEP3.DEP3_INS_CO_NAME,' ')AS DEP3_INS_CO_NAME,
ISNULL(DEP3.DEP3_INS_CO_ADDR1,' ')AS DEP3_INS_CO_ADDR1,
ISNULL(DEP3.DEP3_INS_CO_ADDR2,' ')AS DEP3_INS_CO_ADDR2,
ISNULL(DEP3.DEP3_INS_CO_CITY,' ')AS DEP3_INS_CO_CITY,
ISNULL(DEP3.DEP3_INS_CO_STATE,' ')AS DEP3_INS_CO_STATE,
ISNULL(DEP3.DEP3_INS_CO_ZIP,' ')AS DEP3_INS_CO_ZIP,
ISNULL(DEP3.DEP3_FNAME,' ') AS DEP3_FNAME,
ISNULL(DEP3.DEP3_LNAME,' ') AS DEP3_LNAME,
ISNULL(DEP3.DEP3_SSN,' ') AS DEP3_SSN,
ISNULL(DEP3.DEP3_DOB,' ') AS DEP3_DOB,
ISNULL(DEP3.DEP3_REL_CODE,' ') AS DEP3_REL_CODE,
ISNULL(DEP3.DEP3_SEX,' ') AS DEP3_SEX,
ISNULL(DEP3.DEP3_STUDENT,' ') AS DEP3_STUDENT,
ISNULL(DEP3.DEP3_START_DATE,' ') AS DEP3_START_DATE,
ISNULL(DEP3.DEP3_STOP_DATE,' ') AS DEP3_STOP_DATE,
ISNULL(DEP4.DEP4_INS_CO_NAME,' ')AS DEP4_INS_CO_NAME,
ISNULL(DEP4.DEP4_INS_CO_ADDR1,' ')AS DEP4_INS_CO_ADDR1,
ISNULL(DEP4.DEP4_INS_CO_ADDR2,' ')AS DEP4_INS_CO_ADDR2,
ISNULL(DEP4.DEP4_INS_CO_CITY,' ')AS DEP4_INS_CO_CITY,
ISNULL(DEP4.DEP4_INS_CO_STATE,' ')AS DEP4_INS_CO_STATE,
ISNULL(DEP4.DEP4_INS_CO_ZIP,' ')AS DEP4_INS_CO_ZIP,
ISNULL(DEP4.DEP4_FNAME,' ') AS DEP4_FNAME,
ISNULL(DEP4.DEP4_LNAME,' ') AS DEP4_LNAME,
ISNULL(DEP4.DEP4_SSN,' ') AS DEP4_SSN,
ISNULL(DEP4.DEP4_DOB,' ') AS DEP4_DOB,
ISNULL(DEP4.DEP4_REL_CODE,' ') AS DEP4_REL_CODE,
ISNULL(DEP4.DEP4_SEX,' ') AS DEP4_SEX,
ISNULL(DEP4.DEP4_STUDENT,' ') AS DEP4_STUDENT,
ISNULL(DEP4.DEP4_START_DATE,' ') AS DEP4_START_DATE,
ISNULL(DEP4.DEP4_STOP_DATE,' ') AS DEP4_STOP_DATE,
ISNULL(DEP5.DEP5_INS_CO_NAME,' ')AS DEP5_INS_CO_NAME,
ISNULL(DEP5.DEP5_INS_CO_ADDR1,' ')AS DEP5_INS_CO_ADDR1,
ISNULL(DEP5.DEP5_INS_CO_ADDR2,' ')AS DEP5_INS_CO_ADDR2,
ISNULL(DEP5.DEP5_INS_CO_CITY,' ')AS DEP5_INS_CO_CITY,
ISNULL(DEP5.DEP5_INS_CO_STATE,' ')AS DEP5_INS_CO_STATE,
ISNULL(DEP5.DEP5_INS_CO_ZIP,' ')AS DEP5_INS_CO_ZIP,
ISNULL(DEP5.DEP5_FNAME,' ') AS DEP5_FNAME,
ISNULL(DEP5.DEP5_LNAME,' ') AS DEP5_LNAME,
ISNULL(DEP5.DEP5_SSN,' ') AS DEP5_SSN,
ISNULL(DEP5.DEP5_DOB,' ') AS DEP5_DOB,
ISNULL(DEP5.DEP5_REL_CODE,' ') AS DEP5_REL_CODE,
ISNULL(DEP5.DEP5_SEX,' ') AS DEP5_SEX,
ISNULL(DEP5.DEP5_STUDENT,' ') AS DEP5_STUDENT,
ISNULL(DEP5.DEP5_START_DATE,' ') AS DEP5_START_DATE,
ISNULL(DEP5.DEP5_STOP_DATE,' ') AS DEP5_STOP_DATE,
ISNULL(DEP6.DEP6_INS_CO_NAME,' ')AS DEP6_INS_CO_NAME,
ISNULL(DEP6.DEP6_INS_CO_ADDR1,' ')AS DEP6_INS_CO_ADDR1,
ISNULL(DEP6.DEP6_INS_CO_ADDR2,' ')AS DEP6_INS_CO_ADDR2,
ISNULL(DEP6.DEP6_INS_CO_CITY,' ')AS DEP6_INS_CO_CITY,
ISNULL(DEP6.DEP6_INS_CO_STATE,' ')AS DEP6_INS_CO_STATE,
ISNULL(DEP6.DEP6_INS_CO_ZIP,' ')AS DEP6_INS_CO_ZIP,
ISNULL(DEP6.DEP6_FNAME,' ') AS DEP6_FNAME,
ISNULL(DEP6.DEP6_LNAME,' ') AS DEP6_LNAME,
ISNULL(DEP6.DEP6_SSN,' ') AS DEP6_SSN,
ISNULL(DEP6.DEP6_DOB,' ') AS DEP6_DOB,
ISNULL(DEP6.DEP6_REL_CODE,' ') AS DEP6_REL_CODE,
ISNULL(DEP6.DEP6_SEX,' ') AS DEP6_SEX,
ISNULL(DEP6.DEP6_STUDENT,' ') AS DEP6_STUDENT,
ISNULL(DEP6.DEP6_START_DATE,' ') AS DEP6_START_DATE,
ISNULL(DEP6.DEP6_STOP_DATE,' ') AS DEP6_STOP_DATE,
ISNULL(DEP7.DEP7_INS_CO_NAME,' ')AS DEP7_INS_CO_NAME,
ISNULL(DEP7.DEP7_INS_CO_ADDR1,' ')AS DEP7_INS_CO_ADDR1,
ISNULL(DEP7.DEP7_INS_CO_ADDR2,' ')AS DEP7_INS_CO_ADDR2,
ISNULL(DEP7.DEP7_INS_CO_CITY,' ')AS DEP7_INS_CO_CITY,
ISNULL(DEP7.DEP7_INS_CO_STATE,' ')AS DEP7_INS_CO_STATE,
ISNULL(DEP7.DEP7_INS_CO_ZIP,' ')AS DEP7_INS_CO_ZIP,
ISNULL(DEP7.DEP7_FNAME,' ') AS DEP7_FNAME,
ISNULL(DEP7.DEP7_LNAME,' ') AS DEP7_LNAME,
ISNULL(DEP7.DEP7_SSN,' ') AS DEP7_SSN,
ISNULL(DEP7.DEP7_DOB,' ') AS DEP7_DOB,
ISNULL(DEP7.DEP7_REL_CODE,' ') AS DEP7_REL_CODE,
ISNULL(DEP7.DEP7_SEX,' ') AS DEP7_SEX,
ISNULL(DEP7.DEP7_STUDENT,' ') AS DEP7_STUDENT,
ISNULL(DEP7.DEP7_START_DATE,' ') AS DEP7_START_DATE,
ISNULL(DEP7.DEP7_STOP_DATE,' ') AS DEP7_STOP_DATE,
ISNULL(DEP8.DEP8_INS_CO_NAME,' ')AS DEP8_INS_CO_NAME,
ISNULL(DEP8.DEP8_INS_CO_ADDR1,' ')AS DEP8_INS_CO_ADDR1,
ISNULL(DEP8.DEP8_INS_CO_ADDR2,' ')AS DEP8_INS_CO_ADDR2,
ISNULL(DEP8.DEP8_INS_CO_CITY,' ')AS DEP8_INS_CO_CITY,
ISNULL(DEP8.DEP8_INS_CO_STATE,' ')AS DEP8_INS_CO_STATE,
ISNULL(DEP8.DEP8_INS_CO_ZIP,' ')AS DEP8_INS_CO_ZIP,
ISNULL(DEP8.DEP8_FNAME,' ') AS DEP8_FNAME,
ISNULL(DEP8.DEP8_LNAME,' ') AS DEP8_LNAME,
ISNULL(DEP8.DEP8_SSN,' ') AS DEP8_SSN,
ISNULL(DEP8.DEP8_DOB,' ') AS DEP8_DOB,
ISNULL(DEP8.DEP8_REL_CODE,' ') AS DEP8_REL_CODE,
ISNULL(DEP8.DEP8_SEX,' ') AS DEP8_SEX,
ISNULL(DEP8.DEP8_STUDENT,' ') AS DEP8_STUDENT,
ISNULL(DEP8.DEP8_START_DATE,' ') AS DEP8_START_DATE,
ISNULL(DEP8.DEP8_STOP_DATE,' ') AS DEP8_STOP_DATE
from tblEmpMedPlanReEnroll AS EMP
left JOIN tblDep1MedPlanReEnroll AS DEP1 ON (EMP.EMPLOYEE = DEP1.EMPLOYEE)
left JOIN tblDep2MedPlanReEnroll AS DEP2 ON (EMP.EMPLOYEE = DEP2.EMPLOYEE)
left JOIN tblDep3MedPlanReEnroll AS DEP3 ON (EMP.EMPLOYEE = DEP3.EMPLOYEE)
left JOIN tblDep4MedPlanReEnroll AS DEP4 ON (EMP.EMPLOYEE = DEP4.EMPLOYEE)
left JOIN tblDep5MedPlanReEnroll AS DEP5 ON (EMP.EMPLOYEE = DEP5.EMPLOYEE)
left JOIN tblDep6MedPlanReEnroll AS DEP6 ON (EMP.EMPLOYEE = DEP6.EMPLOYEE)
left JOIN tblDep7MedPlanReEnroll AS DEP7 ON (EMP.EMPLOYEE = DEP7.EMPLOYEE)
left JOIN tblDep8MedPlanReEnroll AS DEP8 ON (EMP.EMPLOYEE = DEP8.EMPLOYEE)
ORDER BY EMP.EMPLOYEE
I have a request from a user to gather information for the employee and family medical information. The amount of dependent can be up to eight with information for each dependent.
I have crerated a tabel for the employee information and for each dependent to eight. I then insert the information into the tables and extract it using the DTS.
It executes using the DTS but when I look at the Destination tab and Transformation tab they are blank and I get the error for removing unmatched transformations.
It still runs but I do not see the column information in the two tabs.
Is this something Microsoft has built in?
Thank you,
TomR100
Here is my code:
SELECT DISTINCT
EMP.EMPLOYEE,
LAST_NAME,
FIRST_NAME,
MIDDLE_INIT,
HOME_PHONE,
ADDR1,
ADDR2,
CITY,
STATE,
ZIP,
SSN,
DOB,
SEX,
MARITAL_STAT,
TERMINAL,
DATE_HIRED,
START_DATE,
STOP_DATE,
COV_OPTION,
SP_EMP_NAME,
SP_EMP_PHONE,
SP_EMP_ADDR1,
SP_EMP_ADDR2,
SP_EMP_CITY,
SP_EMP_STATE,
SP_EMP_ZIP,
ISNULL(DEP1.DEP1_INS_CO_NAME,' ')AS EP1_INS_CO_NAME,
ISNULL(DEP1.DEP1_INS_CO_ADDR1,' ')AS
DEP1_INS_CO_ADDR1,
ISNULL(DEP1.DEP1_INS_CO_ADDR2,' ')AS
DEP1_INS_CO_ADDR2,
ISNULL(DEP1.DEP1_INS_CO_CITY,' ')AS
DEP1_INS_CO_CITY,
ISNULL(DEP1.DEP1_INS_CO_STATE,' ')AS
DEP1_INS_CO_STATE,
ISNULL(DEP1.DEP1_INS_CO_ZIP,' ')AS DEP1_INS_CO_ZIP,
ISNULL(DEP1.DEP1_FNAME,' ') AS DEP1_FNAME,
ISNULL(DEP1.DEP1_LNAME,' ') AS DEP1_LNAME,
ISNULL(DEP1.DEP1_SSN,' ') AS DEP1_SSN,
ISNULL(DEP1.DEP1_DOB,' ') AS DEP1_DOB,
ISNULL(DEP1.DEP1_REL_CODE,' ') AS DEP1_REL_CODE,
ISNULL(DEP1.DEP1_SEX,' ') AS DEP1_SEX,
ISNULL(DEP1.DEP1_STUDENT,' ') AS DEP1_STUDENT,
ISNULL(DEP1.DEP1_START_DATE,' ') AS DEP1_START_DATE,
ISNULL(DEP1.DEP1_STOP_DATE,' ') AS DEP1_STOP_DATE,
ISNULL(DEP2.DEP2_INS_CO_NAME,' ')AS EP2_INS_CO_NAME,
ISNULL(DEP2.DEP2_INS_CO_ADDR1,' ')AS
DEP2_INS_CO_ADDR1,
ISNULL(DEP2.DEP2_INS_CO_ADDR2,' ')AS
DEP2_INS_CO_ADDR2,
ISNULL(DEP2.DEP2_INS_CO_CITY,' ')AS
DEP2_INS_CO_CITY,
ISNULL(DEP2.DEP2_INS_CO_STATE,' ')AS DEP2_INS_CO_STATE,
ISNULL(DEP2.DEP2_INS_CO_ZIP,' ')AS DEP2_INS_CO_ZIP,
ISNULL(DEP2.DEP2_FNAME,' ') AS DEP2_FNAME,
ISNULL(DEP2.DEP2_LNAME,' ') AS DEP2_LNAME,
ISNULL(DEP2.DEP2_SSN,' ') AS DEP2_SSN,
ISNULL(DEP2.DEP2_DOB,' ') AS DEP2_DOB,
ISNULL(DEP2.DEP2_REL_CODE,' ') AS DEP2_REL_CODE,
ISNULL(DEP2.DEP2_SEX,' ') AS DEP2_SEX,
ISNULL(DEP2.DEP2_STUDENT,' ') AS DEP2_STUDENT,
ISNULL(DEP2.DEP2_START_DATE,' ') AS DEP2_START_DATE,
ISNULL(DEP2.DEP2_STOP_DATE,' ') AS DEP2_STOP_DATE,
ISNULL(DEP3.DEP3_INS_CO_NAME,' ')AS DEP3_INS_CO_NAME,
ISNULL(DEP3.DEP3_INS_CO_ADDR1,' ')AS DEP3_INS_CO_ADDR1,
ISNULL(DEP3.DEP3_INS_CO_ADDR2,' ')AS DEP3_INS_CO_ADDR2,
ISNULL(DEP3.DEP3_INS_CO_CITY,' ')AS DEP3_INS_CO_CITY,
ISNULL(DEP3.DEP3_INS_CO_STATE,' ')AS DEP3_INS_CO_STATE,
ISNULL(DEP3.DEP3_INS_CO_ZIP,' ')AS DEP3_INS_CO_ZIP,
ISNULL(DEP3.DEP3_FNAME,' ') AS DEP3_FNAME,
ISNULL(DEP3.DEP3_LNAME,' ') AS DEP3_LNAME,
ISNULL(DEP3.DEP3_SSN,' ') AS DEP3_SSN,
ISNULL(DEP3.DEP3_DOB,' ') AS DEP3_DOB,
ISNULL(DEP3.DEP3_REL_CODE,' ') AS DEP3_REL_CODE,
ISNULL(DEP3.DEP3_SEX,' ') AS DEP3_SEX,
ISNULL(DEP3.DEP3_STUDENT,' ') AS DEP3_STUDENT,
ISNULL(DEP3.DEP3_START_DATE,' ') AS DEP3_START_DATE,
ISNULL(DEP3.DEP3_STOP_DATE,' ') AS DEP3_STOP_DATE,
ISNULL(DEP4.DEP4_INS_CO_NAME,' ')AS DEP4_INS_CO_NAME,
ISNULL(DEP4.DEP4_INS_CO_ADDR1,' ')AS DEP4_INS_CO_ADDR1,
ISNULL(DEP4.DEP4_INS_CO_ADDR2,' ')AS DEP4_INS_CO_ADDR2,
ISNULL(DEP4.DEP4_INS_CO_CITY,' ')AS DEP4_INS_CO_CITY,
ISNULL(DEP4.DEP4_INS_CO_STATE,' ')AS DEP4_INS_CO_STATE,
ISNULL(DEP4.DEP4_INS_CO_ZIP,' ')AS DEP4_INS_CO_ZIP,
ISNULL(DEP4.DEP4_FNAME,' ') AS DEP4_FNAME,
ISNULL(DEP4.DEP4_LNAME,' ') AS DEP4_LNAME,
ISNULL(DEP4.DEP4_SSN,' ') AS DEP4_SSN,
ISNULL(DEP4.DEP4_DOB,' ') AS DEP4_DOB,
ISNULL(DEP4.DEP4_REL_CODE,' ') AS DEP4_REL_CODE,
ISNULL(DEP4.DEP4_SEX,' ') AS DEP4_SEX,
ISNULL(DEP4.DEP4_STUDENT,' ') AS DEP4_STUDENT,
ISNULL(DEP4.DEP4_START_DATE,' ') AS DEP4_START_DATE,
ISNULL(DEP4.DEP4_STOP_DATE,' ') AS DEP4_STOP_DATE,
ISNULL(DEP5.DEP5_INS_CO_NAME,' ')AS DEP5_INS_CO_NAME,
ISNULL(DEP5.DEP5_INS_CO_ADDR1,' ')AS DEP5_INS_CO_ADDR1,
ISNULL(DEP5.DEP5_INS_CO_ADDR2,' ')AS DEP5_INS_CO_ADDR2,
ISNULL(DEP5.DEP5_INS_CO_CITY,' ')AS DEP5_INS_CO_CITY,
ISNULL(DEP5.DEP5_INS_CO_STATE,' ')AS DEP5_INS_CO_STATE,
ISNULL(DEP5.DEP5_INS_CO_ZIP,' ')AS DEP5_INS_CO_ZIP,
ISNULL(DEP5.DEP5_FNAME,' ') AS DEP5_FNAME,
ISNULL(DEP5.DEP5_LNAME,' ') AS DEP5_LNAME,
ISNULL(DEP5.DEP5_SSN,' ') AS DEP5_SSN,
ISNULL(DEP5.DEP5_DOB,' ') AS DEP5_DOB,
ISNULL(DEP5.DEP5_REL_CODE,' ') AS DEP5_REL_CODE,
ISNULL(DEP5.DEP5_SEX,' ') AS DEP5_SEX,
ISNULL(DEP5.DEP5_STUDENT,' ') AS DEP5_STUDENT,
ISNULL(DEP5.DEP5_START_DATE,' ') AS DEP5_START_DATE,
ISNULL(DEP5.DEP5_STOP_DATE,' ') AS DEP5_STOP_DATE,
ISNULL(DEP6.DEP6_INS_CO_NAME,' ')AS DEP6_INS_CO_NAME,
ISNULL(DEP6.DEP6_INS_CO_ADDR1,' ')AS DEP6_INS_CO_ADDR1,
ISNULL(DEP6.DEP6_INS_CO_ADDR2,' ')AS DEP6_INS_CO_ADDR2,
ISNULL(DEP6.DEP6_INS_CO_CITY,' ')AS DEP6_INS_CO_CITY,
ISNULL(DEP6.DEP6_INS_CO_STATE,' ')AS DEP6_INS_CO_STATE,
ISNULL(DEP6.DEP6_INS_CO_ZIP,' ')AS DEP6_INS_CO_ZIP,
ISNULL(DEP6.DEP6_FNAME,' ') AS DEP6_FNAME,
ISNULL(DEP6.DEP6_LNAME,' ') AS DEP6_LNAME,
ISNULL(DEP6.DEP6_SSN,' ') AS DEP6_SSN,
ISNULL(DEP6.DEP6_DOB,' ') AS DEP6_DOB,
ISNULL(DEP6.DEP6_REL_CODE,' ') AS DEP6_REL_CODE,
ISNULL(DEP6.DEP6_SEX,' ') AS DEP6_SEX,
ISNULL(DEP6.DEP6_STUDENT,' ') AS DEP6_STUDENT,
ISNULL(DEP6.DEP6_START_DATE,' ') AS DEP6_START_DATE,
ISNULL(DEP6.DEP6_STOP_DATE,' ') AS DEP6_STOP_DATE,
ISNULL(DEP7.DEP7_INS_CO_NAME,' ')AS DEP7_INS_CO_NAME,
ISNULL(DEP7.DEP7_INS_CO_ADDR1,' ')AS DEP7_INS_CO_ADDR1,
ISNULL(DEP7.DEP7_INS_CO_ADDR2,' ')AS DEP7_INS_CO_ADDR2,
ISNULL(DEP7.DEP7_INS_CO_CITY,' ')AS DEP7_INS_CO_CITY,
ISNULL(DEP7.DEP7_INS_CO_STATE,' ')AS DEP7_INS_CO_STATE,
ISNULL(DEP7.DEP7_INS_CO_ZIP,' ')AS DEP7_INS_CO_ZIP,
ISNULL(DEP7.DEP7_FNAME,' ') AS DEP7_FNAME,
ISNULL(DEP7.DEP7_LNAME,' ') AS DEP7_LNAME,
ISNULL(DEP7.DEP7_SSN,' ') AS DEP7_SSN,
ISNULL(DEP7.DEP7_DOB,' ') AS DEP7_DOB,
ISNULL(DEP7.DEP7_REL_CODE,' ') AS DEP7_REL_CODE,
ISNULL(DEP7.DEP7_SEX,' ') AS DEP7_SEX,
ISNULL(DEP7.DEP7_STUDENT,' ') AS DEP7_STUDENT,
ISNULL(DEP7.DEP7_START_DATE,' ') AS DEP7_START_DATE,
ISNULL(DEP7.DEP7_STOP_DATE,' ') AS DEP7_STOP_DATE,
ISNULL(DEP8.DEP8_INS_CO_NAME,' ')AS DEP8_INS_CO_NAME,
ISNULL(DEP8.DEP8_INS_CO_ADDR1,' ')AS DEP8_INS_CO_ADDR1,
ISNULL(DEP8.DEP8_INS_CO_ADDR2,' ')AS DEP8_INS_CO_ADDR2,
ISNULL(DEP8.DEP8_INS_CO_CITY,' ')AS DEP8_INS_CO_CITY,
ISNULL(DEP8.DEP8_INS_CO_STATE,' ')AS DEP8_INS_CO_STATE,
ISNULL(DEP8.DEP8_INS_CO_ZIP,' ')AS DEP8_INS_CO_ZIP,
ISNULL(DEP8.DEP8_FNAME,' ') AS DEP8_FNAME,
ISNULL(DEP8.DEP8_LNAME,' ') AS DEP8_LNAME,
ISNULL(DEP8.DEP8_SSN,' ') AS DEP8_SSN,
ISNULL(DEP8.DEP8_DOB,' ') AS DEP8_DOB,
ISNULL(DEP8.DEP8_REL_CODE,' ') AS DEP8_REL_CODE,
ISNULL(DEP8.DEP8_SEX,' ') AS DEP8_SEX,
ISNULL(DEP8.DEP8_STUDENT,' ') AS DEP8_STUDENT,
ISNULL(DEP8.DEP8_START_DATE,' ') AS DEP8_START_DATE,
ISNULL(DEP8.DEP8_STOP_DATE,' ') AS DEP8_STOP_DATE
from tblEmpMedPlanReEnroll AS EMP
left JOIN tblDep1MedPlanReEnroll AS DEP1 ON (EMP.EMPLOYEE = DEP1.EMPLOYEE)
left JOIN tblDep2MedPlanReEnroll AS DEP2 ON (EMP.EMPLOYEE = DEP2.EMPLOYEE)
left JOIN tblDep3MedPlanReEnroll AS DEP3 ON (EMP.EMPLOYEE = DEP3.EMPLOYEE)
left JOIN tblDep4MedPlanReEnroll AS DEP4 ON (EMP.EMPLOYEE = DEP4.EMPLOYEE)
left JOIN tblDep5MedPlanReEnroll AS DEP5 ON (EMP.EMPLOYEE = DEP5.EMPLOYEE)
left JOIN tblDep6MedPlanReEnroll AS DEP6 ON (EMP.EMPLOYEE = DEP6.EMPLOYEE)
left JOIN tblDep7MedPlanReEnroll AS DEP7 ON (EMP.EMPLOYEE = DEP7.EMPLOYEE)
left JOIN tblDep8MedPlanReEnroll AS DEP8 ON (EMP.EMPLOYEE = DEP8.EMPLOYEE)
ORDER BY EMP.EMPLOYEE