/*
CREATE TABLE IMPORT_CASH (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_CHECK (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_MHADD (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_MHCMTS (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_MHDECAL (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_MHOPT (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_MOBIL (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_PARCEL (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_PTCMTS (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_TIMBER (RAWDATA VARCHAR(4000) NULL )
CREATE TABLE IMPORT_HDE (RAWDATA VARCHAR(4000) NULL )
*/

TRUNCATE TABLE IMPORT_CASH
BULK INSERT IMPORT_CASH
FROM 'E:\tco\GSI\cash.txt'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_CHECK
BULK INSERT IMPORT_CHECK
FROM 'E:\tco\GSI\CHECK.txt'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_MHADD
BULK INSERT IMPORT_MHADD
FROM 'E:\tco\GSI\MHADD'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_MHCMTS
BULK INSERT IMPORT_MHCMTS
FROM 'E:\tco\GSI\MHCMTS'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_MHDECAL
BULK INSERT IMPORT_MHDECAL
FROM 'E:\tco\GSI\MHDECAL'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_MHOPT
BULK INSERT IMPORT_MHOPT
FROM 'E:\tco\GSI\MHOPT'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_MOBIL
BULK INSERT IMPORT_MOBIL
FROM 'E:\tco\GSI\MOBILE'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_PARCEL
BULK INSERT IMPORT_PARCEL
FROM 'E:\tco\GSI\PARCEL'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_PTCMTS
BULK INSERT IMPORT_PTCMTS
FROM 'E:\tco\GSI\PTCMTS'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_TIMBER
BULK INSERT IMPORT_TIMBER
FROM 'E:\tco\GSI\TIMBER'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE IMPORT_HDE
BULK INSERT IMPORT_HDE
FROM 'E:\tco\GSI\HDEQUIP.TXT'
WITH
(
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',  --CSV field delimiter -- '\t' = tab
    ROWTERMINATOR = '\n',   --Use to shift the control to next row; '0x0a' = line feed
    TABLOCK
)

TRUNCATE TABLE DBO.CASH 

INSERT INTO [dbo].[CASH]
           ([BILL_YEAR]
           ,[APPCODE]
           ,[BILL_NO]
           ,[CATEGORY]
           ,[RECTYPE]
           ,[TAXDISTRIC]
           ,[SEQNUM]
           ,[TAGNUMBER]
           ,[ACCT_NO]
           ,[ACCT_LINENO]
           ,[CHECK_NO]
           ,[HOMESTEAD_CODE]
           ,[FILL1]
           ,[REGISTER]
           ,[POSTING_DATE]
           ,[PROPNAME]
           ,[TOTALTAXAMT]
           ,[TAXAMT_1]
           ,[TAXAMT_2]
           ,[TAXAMT_3]
           ,[TAXAMT_4]
           ,[TAXAMT_5]
           ,[TAXAMT_6]
           ,[TAXAMT_7]
           ,[TAXAMT_8]
           ,[TAXAMT_9]
           ,[TAXAMT_10]
           ,[TAXAMT_11]
           ,[TAXAMT_12]
           ,[TAXAMT_13]
           ,[TAXAMT_14]
           ,[TAXAMT_15]
           ,[TAXAMT_16]
           ,[TAXAMT_17]
           ,[TAXAMT_18]
           ,[TAXAMT_19]
           ,[TAXAMT_20]
           ,[COMPNAME]
           ,[TRANS_DATE]
           ,[TRANS_TIME]
           ,[TOTALHS_CREDIT]
           ,[HSCREDIT_1]
           ,[HSCREDIT_2]
           ,[HSCREDIT_3]
           ,[HSCREDIT_4]
           ,[HSCREDIT_5]
           ,[HSCREDIT_6]
           ,[HSCREDIT_7]
           ,[HSCREDIT_8]
           ,[HSCREDIT_9]
           ,[HSCREDIT_10]
           ,[HSCREDIT_11]
           ,[HSCREDIT_12]
           ,[HSCREDIT_13]
           ,[HSCREDIT_14]
           ,[HSCREDIT_15]
           ,[HSCREDIT_16]
           ,[HSCREDIT_17]
           ,[HSCREDIT_18]
           ,[HSCREDIT_19]
           ,[HSCREDIT_20]
           ,[HSCHANGE_REASON]
           ,[HSCRED_EXEMPT_1]
           ,[HSCRED_EXEMPT_2]
           ,[HSCRED_EXEMPT_3]
           ,[HSCRED_EXEMPT_4]
           ,[HSCRED_EXEMPT_5]
           ,[HSCRED_EXEMPT_6]
           ,[HSCRED_EXEMPT_7]
           ,[HSCRED_EXEMPT_8]
           ,[HSCRED_EXEMPT_9]
           ,[HSCRED_EXEMPT_10]
           ,[HSCRED_EXEMPT_11]
           ,[HSCRED_EXEMPT_12]
           ,[HSCRED_EXEMPT_13]
           ,[HSCRED_EXEMPT_14]
           ,[HSCRED_EXEMPT_15]
           ,[HSCRED_EXEMPT_16]
           ,[HSCRED_EXEMPT_17]
           ,[HSCRED_EXEMPT_18]
           ,[HSCRED_EXEMPT_19]
           ,[HSCRED_EXEMPT_20]
		   )
     
	 SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,2)
, SUBSTRING(RAWDATA,7,10)
, SUBSTRING(RAWDATA,17,2)
, SUBSTRING(RAWDATA,19,2)
, SUBSTRING(RAWDATA,21,2)
, SUBSTRING(RAWDATA,23,4)
, SUBSTRING(RAWDATA,27,12)
, SUBSTRING(RAWDATA,27,6)
, SUBSTRING(RAWDATA,33,3)
, SUBSTRING(RAWDATA,27,9)
, SUBSTRING(RAWDATA,36,2)
, SUBSTRING(RAWDATA,38,1)
, SUBSTRING(RAWDATA,39,2)
, SUBSTRING(RAWDATA,41,8)
, SUBSTRING(RAWDATA,49,24)
, SUBSTRING(RAWDATA,73,12)
, SUBSTRING(RAWDATA,85,10)
, SUBSTRING(RAWDATA,95,10)
, SUBSTRING(RAWDATA,105,10)
, SUBSTRING(RAWDATA,115,10)
, SUBSTRING(RAWDATA,125,10)
, SUBSTRING(RAWDATA,135,10)
, SUBSTRING(RAWDATA,145,10)
, SUBSTRING(RAWDATA,155,10)
, SUBSTRING(RAWDATA,165,10)
, SUBSTRING(RAWDATA,175,10)
, SUBSTRING(RAWDATA,185,10)
, SUBSTRING(RAWDATA,195,10)
, SUBSTRING(RAWDATA,205,10)
, SUBSTRING(RAWDATA,215,10)
, SUBSTRING(RAWDATA,225,10)
, SUBSTRING(RAWDATA,235,10)
, SUBSTRING(RAWDATA,245,10)
, SUBSTRING(RAWDATA,255,10)
, SUBSTRING(RAWDATA,265,10)
, SUBSTRING(RAWDATA,275,10)
, SUBSTRING(RAWDATA,285,8)
, SUBSTRING(RAWDATA,293,8)
, SUBSTRING(RAWDATA,301,6)
, SUBSTRING(RAWDATA,307,12)
, SUBSTRING(RAWDATA,319,10)
, SUBSTRING(RAWDATA,329,10)
, SUBSTRING(RAWDATA,339,10)
, SUBSTRING(RAWDATA,349,10)
, SUBSTRING(RAWDATA,359,10)
, SUBSTRING(RAWDATA,369,10)
, SUBSTRING(RAWDATA,379,10)
, SUBSTRING(RAWDATA,389,10)
, SUBSTRING(RAWDATA,399,10)
, SUBSTRING(RAWDATA,409,10)
, SUBSTRING(RAWDATA,419,10)
, SUBSTRING(RAWDATA,429,10)
, SUBSTRING(RAWDATA,439,10)
, SUBSTRING(RAWDATA,449,10)
, SUBSTRING(RAWDATA,459,10)
, SUBSTRING(RAWDATA,469,10)
, SUBSTRING(RAWDATA,479,10)
, SUBSTRING(RAWDATA,489,10)
, SUBSTRING(RAWDATA,499,10)
, SUBSTRING(RAWDATA,509,10)
, SUBSTRING(RAWDATA,519,80)
, SUBSTRING(RAWDATA,599,6)
, SUBSTRING(RAWDATA,605,6)
, SUBSTRING(RAWDATA,611,6)
, SUBSTRING(RAWDATA,617,6)
, SUBSTRING(RAWDATA,623,6)
, SUBSTRING(RAWDATA,629,6)
, SUBSTRING(RAWDATA,635,6)
, SUBSTRING(RAWDATA,641,6)
, SUBSTRING(RAWDATA,647,6)
, SUBSTRING(RAWDATA,653,6)
, SUBSTRING(RAWDATA,659,6)
, SUBSTRING(RAWDATA,665,6)
, SUBSTRING(RAWDATA,671,6)
, SUBSTRING(RAWDATA,677,6)
, SUBSTRING(RAWDATA,683,6)
, SUBSTRING(RAWDATA,689,6)
, SUBSTRING(RAWDATA,695,6)
, SUBSTRING(RAWDATA,701,6)
, SUBSTRING(RAWDATA,707,6)
, SUBSTRING(RAWDATA,713,6)

		FROM IMPORT_CASH 
		where SUBSTRING(RAWDATA,1,4) >= '2012'

TRUNCATE TABLE DBO.[CHECK]
INSERT INTO [dbo].[CHECK]
           ([CHECKDATE]
           ,[CHECK_NO]
           ,[PAID_BY]
           ,[TAX_YEAR]
           ,[APPCODE]
           ,[BILL_NO]
           ,[REGISTER]
           ,[CHECK_AMT]
           ,[AMT2BILL]
           ,[TAG_NO])
SELECT 
SUBSTRING(RAWDATA,1,8)
,SUBSTRING(RAWDATA,9,9)
,SUBSTRING(RAWDATA,18,24)
,SUBSTRING(RAWDATA,42,4)
,SUBSTRING(RAWDATA,46,2)
,SUBSTRING(RAWDATA,48,10)
,SUBSTRING(RAWDATA,58,2)
,SUBSTRING(RAWDATA,60,12)
,SUBSTRING(RAWDATA,72,12)
,SUBSTRING(RAWDATA,84,12)
FROM IMPORT_CHECK 

truncate table dbo.mhadd
INSERT INTO [dbo].[MHADD]
           ([TAX_YEAR]
           ,[ACCT_NO]
           ,[LINE_NO]
           ,[OPT_ID]
           ,[MFG]
           ,[MODEL]
           ,[MFG_IDNO]
           ,[TITLE_NO]
           ,[YR_BUILT]
           ,[EFYR_BUILT]
           ,[WIDTH]
           ,[LENGTH]
           ,[CLASS_OVRCODE]
           ,[CLASS_SCH]
           ,[OVR_DEP]
           ,[PHY_DEP]
           ,[OVRCODE]
           ,[FMV]
           ,[MSIZADJ])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,3)
, SUBSTRING(RAWDATA,14,2)
, SUBSTRING(RAWDATA,15,25)
, SUBSTRING(RAWDATA,41,25)
, SUBSTRING(RAWDATA,66,25)
, SUBSTRING(RAWDATA,91,25)
, SUBSTRING(RAWDATA,115,4)
, SUBSTRING(RAWDATA,120,4)
, SUBSTRING(RAWDATA,124,2)
, SUBSTRING(RAWDATA,126,2)
, SUBSTRING(RAWDATA,128,1)
, SUBSTRING(RAWDATA,129,2)
, SUBSTRING(RAWDATA,131,1)
, SUBSTRING(RAWDATA,132,4)
, SUBSTRING(RAWDATA,136,1)
, SUBSTRING(RAWDATA,137,6)
, SUBSTRING(RAWDATA,143,4)
FROM IMPORT_MHADD

truncate table dbo.mhcmts
INSERT INTO [dbo].[MHCMTS]
           ([TAX_YEAR]
           ,[ACCT_NO]
           ,[LINE_NO]
           ,[PAGE_NO]
           ,[COMMENT1]
           ,[COMMENT2]
           ,[COMMENT3]
           ,[COMMENT4]
           ,[COMMENT5]
           ,[COMMENT6]
           ,[COMMENT7])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,3)
, SUBSTRING(RAWDATA,14,2)
, SUBSTRING(RAWDATA,16,70)
, SUBSTRING(RAWDATA,86,70)
, SUBSTRING(RAWDATA,156,70)
, SUBSTRING(RAWDATA,226,70)
, SUBSTRING(RAWDATA,296,70)
, SUBSTRING(RAWDATA,366,70)
, SUBSTRING(RAWDATA,436,70)
FROM IMPORT_MHCMTS


truncate table dbo.mhdecal
INSERT INTO [dbo].[MHDECAL]
           ([TAX_YEAR]
           ,[DECAL_NO]
           ,[BILL_NO]
           ,[LINE_NO]
           ,[PARCEL_NO]
           ,[BLDG_NO]
           ,[ACCT_NO]
           ,[DECAL_PURCHASE_DATE]
           ,[REGISTER])
SELECT
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,8)
, SUBSTRING(RAWDATA,13,6)
, SUBSTRING(RAWDATA,19,3)
, SUBSTRING(RAWDATA,22,16)
, SUBSTRING(RAWDATA,38,3)
, SUBSTRING(RAWDATA,41,6)
, SUBSTRING(RAWDATA,47,8)
, SUBSTRING(RAWDATA,55,2)
FROM IMPORT_MHDECAL

truncate table dbo.mhopt
INSERT INTO [dbo].[MHOPT]
           ([TAX_YEAR]
           ,[ACCT_NO]
           ,[LINE_NO]
           ,[OPT_ID]
           ,[OPT_COUNT]
           ,[OPT_CODE]
           ,[WIDTH]
           ,[LENGTH]
           ,[UNITS]
           ,[HEIGHT]
           ,[GRADE]
           ,[YR_BUILT]
           ,[PHY_DEP]
           ,[FMV]
           ,[PRINT_POS]
           ,[DESCRIP])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,3)
, SUBSTRING(RAWDATA,14,2)
, SUBSTRING(RAWDATA,16,2)
, SUBSTRING(RAWDATA,18,2)
, SUBSTRING(RAWDATA,20,3)
, SUBSTRING(RAWDATA,23,4)
, SUBSTRING(RAWDATA,20,7)
, SUBSTRING(RAWDATA,27,2)
, SUBSTRING(RAWDATA,29,3)
, SUBSTRING(RAWDATA,32,4)
, SUBSTRING(RAWDATA,36,2)
, SUBSTRING(RAWDATA,38,8)
, SUBSTRING(RAWDATA,46,1)
, SUBSTRING(RAWDATA,47,16)
FROM IMPORT_MHOPT

truncate table dbo.mobil
INSERT INTO [dbo].[MOBIL]
           ([TAX_YEAR]
           ,[ACCOUNT_NO]
           ,[LINE_NO]
           ,[BILL_NO]
           ,[DECAL_NO]
           ,[MILL_YR]
           ,[PREV_ACCT_NO]
           ,[PREV_LINE_NO]
           ,[PREV_BILL_NO]
           ,[PREV_DECAL_NO]
           ,[TAXDISTRIC]
           ,[MAP]
           ,[BLOCK]
           ,[PARCEL]
           ,[SUBPARC]
           ,[ACC_BLDG_NO]
           ,[SITUS_ADDRESS]
           ,[SITUS_CITY]
           ,[SITUS_STATE]
           ,[SITUS_ZIP]
           ,[ON_TAX_DIGEST]
           ,[MFG]
           ,[MODEL]
           ,[ID_NO1]
           ,[TITLE_NO1]
           ,[ID_NO2]
           ,[TITLE_NO2]
           ,[YR_BUILT]
           ,[EFYR_BUILT]
           ,[WIDTH]
           ,[LENGTH]
           ,[NEW_USED]
           ,[PURCHASE_DATE]
           ,[FMV]
           ,[OVR_CODE]
           ,[GRADE]
           ,[OVR_DEP]
           ,[PHY_DEP]
           ,[OVR_CODE2]
           ,[VALUE]
           ,[PURCHASE_PRICE]
           ,[ADDONVAL]
           ,[OPTIONS_VAL]
           ,[HVAC_VAL]
           ,[PORCH_VAL]
           ,[ROOMS_VAL]
           ,[DECK_VAL]
           ,[FIRE_VAL]
           ,[UTIL_VAL]
           ,[CARP_VAL]
           ,[UNDERPIN_VAL]
           ,[TOTAL_OPTIONS_VAL]
           ,[PENALTY_FLAG]
           ,[DUE_DATE]
           ,[LENDOR_CODE]
           ,[ADD_COUNT]
           ,[OPTION_COUNT]
           ,[DEALER_CODE]
           ,[DELETE_CODE]
           ,[DELETE_DATE]
           ,[LAST_DATE]
           ,[FLAT_CHG1]
           ,[FLAT_CHG2]
           ,[MSIZADJ]
           ,[OWNER_NAME]
           ,[OWNER_ADD1]
           ,[OWNER_ADD2]
           ,[OWNER_ADD3]
           ,[OWNER_CITY]
           ,[OWNER_STATE]
           ,[OWNER_ZIP]
           ,[EXEMPT]
           ,[ST_NUM]
           ,[ST_NAME]
           ,[SD_LOT]
           ,[SD_BLOCK]
           ,[SD_NAME]
           ,[APPEAL_NO]
           ,[CITATION_NO]
           ,[TOTAL_MHFMV]
           ,[ADDON_CHG])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,3)
, SUBSTRING(RAWDATA,14,6)
, SUBSTRING(RAWDATA,20,8)
, SUBSTRING(RAWDATA,28,4)
, SUBSTRING(RAWDATA,32,6)
, SUBSTRING(RAWDATA,38,3)
, SUBSTRING(RAWDATA,41,6)
, SUBSTRING(RAWDATA,47,8)
, SUBSTRING(RAWDATA,55,2)
, SUBSTRING(RAWDATA,57,5)
, SUBSTRING(RAWDATA,62,5)
, SUBSTRING(RAWDATA,67,3)
, SUBSTRING(RAWDATA,70,3)
, SUBSTRING(RAWDATA,73,3)
, SUBSTRING(RAWDATA,76,35)
, SUBSTRING(RAWDATA,111,13)
, SUBSTRING(RAWDATA,124,2)
, SUBSTRING(RAWDATA,126,9)
, SUBSTRING(RAWDATA,135,1)
, SUBSTRING(RAWDATA,136,25)
, SUBSTRING(RAWDATA,161,25)
, SUBSTRING(RAWDATA,186,25)
, SUBSTRING(RAWDATA,211,25)
, SUBSTRING(RAWDATA,236,25)
, SUBSTRING(RAWDATA,261,25)
, SUBSTRING(RAWDATA,286,4)
, SUBSTRING(RAWDATA,290,4)
, SUBSTRING(RAWDATA,294,2)
, SUBSTRING(RAWDATA,296,2)
, SUBSTRING(RAWDATA,298,1)
, SUBSTRING(RAWDATA,299,8)
, SUBSTRING(RAWDATA,307,6)
, SUBSTRING(RAWDATA,313,1)
, SUBSTRING(RAWDATA,314,2)
, SUBSTRING(RAWDATA,316,1)
, SUBSTRING(RAWDATA,317,4)
, SUBSTRING(RAWDATA,321,1)
, SUBSTRING(RAWDATA,322,6)
, SUBSTRING(RAWDATA,328,6)
, SUBSTRING(RAWDATA,334,6)
, SUBSTRING(RAWDATA,340,6)
, SUBSTRING(RAWDATA,346,6)
, SUBSTRING(RAWDATA,353,6)
, SUBSTRING(RAWDATA,358,6)
, SUBSTRING(RAWDATA,364,6)
, SUBSTRING(RAWDATA,370,6)
, SUBSTRING(RAWDATA,376,6)
, SUBSTRING(RAWDATA,382,6)
, SUBSTRING(RAWDATA,388,6)
, SUBSTRING(RAWDATA,394,6)
, SUBSTRING(RAWDATA,400,1)
, SUBSTRING(RAWDATA,401,8)
, SUBSTRING(RAWDATA,409,6)
, SUBSTRING(RAWDATA,415,2)
, SUBSTRING(RAWDATA,417,2)
, SUBSTRING(RAWDATA,419,1)
, SUBSTRING(RAWDATA,420,1)
, SUBSTRING(RAWDATA,421,8)
, SUBSTRING(RAWDATA,429,8)
, SUBSTRING(RAWDATA,437,3)
, SUBSTRING(RAWDATA,440,3)
, SUBSTRING(RAWDATA,443,4)
, SUBSTRING(RAWDATA,447,24)
, SUBSTRING(RAWDATA,471,24)
, SUBSTRING(RAWDATA,495,24)
, SUBSTRING(RAWDATA,519,24)
, SUBSTRING(RAWDATA,543,13)
, SUBSTRING(RAWDATA,556,2)
, SUBSTRING(RAWDATA,558,9)
, SUBSTRING(RAWDATA,567,1)
, SUBSTRING(RAWDATA,568,5)
, SUBSTRING(RAWDATA,573,20)
, SUBSTRING(RAWDATA,593,5)
, SUBSTRING(RAWDATA,598,4)
, SUBSTRING(RAWDATA,602,20)
, SUBSTRING(RAWDATA,622,10)
, SUBSTRING(RAWDATA,632,10)
, SUBSTRING(RAWDATA,642,8)
, SUBSTRING(RAWDATA,650,8)
FROM IMPORT_MOBIL

truncate table dbo.parcel
INSERT INTO [dbo].[PARCEL]
           ([ACCT_NO]
           ,[LINE_NO]
           ,[TAXDISTRIC]
           ,[MAP]
           ,[BLOCK]
           ,[PARCEL]
           ,[SUBPARC]
           ,[OWNER_NAME]
           ,[ADDRESS1]
           ,[ADDRESS2]
           ,[ADDRESS3]
           ,[CITY]
           ,[STATE]
           ,[ZIP]
           ,[LEGAL_DESC]
           ,[ST_NAME]
           ,[ST_NUM]
           ,[SD_NAME]
           ,[SD_BLOCK]
           ,[SD_LOT]
           ,[LD]
           ,[LL]
           ,[DEEDBK]
           ,[DEEDPG]
           ,[PLATBK]
           ,[PLATPG]
           ,[NOTUSED1]
           ,[SALEREASON]
           ,[SALECODE]
           ,[SALEDATE]
           ,[TOTALACRES]
           ,[PREFACRES]
           ,[TIMBERACRES]
           ,[HOMEEXEMPT]
           ,[FLOATBASE]
           ,[FLOATYEAR]
           ,[PREV_VAL]
           ,[RETURN_VAL]
           ,[LENDER_CODE]
           ,[HS_CERT_NO]
           ,[TOPO]
           ,[UTILITIESE]
           ,[ST_TYPE_CODE]
           ,[ROADCLASS]
           ,[DISTRICT]
           ,[APPEAL_FLAG]
           ,[APPEAL_YR]
           ,[REVALUE_FLAG]
           ,[COV_CODE]
           ,[COV_YEAR]
           ,[COV_VALUE]
           ,[FLAT_CHG1]
           ,[FLAG_CHG2]
           ,[NOTUSED2]
           ,[PENALTY_FLAG]
           ,[CITY_HOMEEXEMPT]
           ,[ST_CODE1]
           ,[ST_VALUE1]
           ,[ST_CODE2]
           ,[ST_VALUE2]
           ,[ST_CODE3]
           ,[ST_VALUE3]
           ,[ST_CODE4]
           ,[ST_VALUE4]
           ,[ST_CODE5]
           ,[ST_VALUE5]
           ,[ST_CODE6]
           ,[ST_VALUE6]
           ,[ST_CODE7]
           ,[ST_VALUE7]
           ,[ST_CODE8]
           ,[ST_VALUE8]
           ,[ST_CODE9]
           ,[ST_VALUE9]
           ,[ST_CODE10]
           ,[ST_VALUE10]
           ,[SSN1]
           ,[SSN2]
           ,[INCOME]
           ,[COMMENT]
           ,[OLD_MAP]
           ,[OLD_BLOCK]
           ,[OLD_PARCEL]
           ,[OLD_SUBPARC]
           ,[NOTUSED3]
           ,[NOTUSED4]
           ,[ZONINGCODE]
           ,[HS_PERC]
           ,[RFC1]
           ,[RFC2]
           ,[RFC3]
           ,[RFC4]
           ,[RFC5]
           ,[RFC6]
           ,[RFC7]
           ,[RFC8]
           ,[RFC9]
           ,[RFC10]
           ,[APPEAL_NO]
           ,[APLSTAT]
           ,[BILL_DATE]
           ,[DUE_DATE]
           ,[BILL_NO]
           ,[SPECIAL_HSCODE]
           ,[LATE_FILING_PENALTY]
           ,[HS_BASE1]
           ,[HS_VAL1]
           ,[HS_BASE2]
           ,[HS_VAL2]
           ,[INFL_GROWTH]
           ,[REAL_GROWTH]
           ,[PST_CODE1]
           ,[PST_VALUE1]
           ,[PST_CODE2]
           ,[PST_VALUE2]
           ,[PST_CODE3]
           ,[PST_VALUE3]
           ,[PST_CODE4]
           ,[PST_VALUE4]
           ,[PST_CODE5]
           ,[PST_VALUE5]
           ,[PST_CODE6]
           ,[PST_VALUE6]
           ,[PST_CODE7]
           ,[PST_VALUE7]
           ,[PST_CODE8]
           ,[PST_VALUE8]
           ,[PST_CODE9]
           ,[PST_VALUE9]
           ,[PST_CODE10]
           ,[PST_VALUE10]
           ,[TR_CODE1]
           ,[TR_VAL1]
           ,[TR_CODE2]
           ,[TR_VAL2]
           ,[TR_CODE3]
           ,[TR_VAL3]
           ,[TR_CODE4]
           ,[TR_VAL4]
           ,[TR_CODE5]
           ,[TR_VAL5]
           ,[TR_CODE6]
           ,[TR_VAL6]
           ,[TR_CODE7]
           ,[TR_VAL7]
           ,[TR_CODE8]
           ,[TR_VAL8]
           ,[TR_CODE9]
           ,[TR_VAL9]
           ,[TR_CODE10]
           ,[TR_VAL10]
           ,[OWNER_CHGCODE]
           ,[PREV_CUVA_VAL]
           ,[CUV93S]
           ,[PCOV_CODE]
           ,[PHOMEEXEMPT]
           ,[PCITY_HS]
           ,[PHS_PERC]
           ,[PHS_BASE]
           ,[PTAXDISTRIC]
           ,[PMILLRATE]
           ,[PHSBASE1]
           ,[PHSVAL1]
           ,[PHSBASE2]
           ,[PHSVAL2]
           ,[BILL_YEAR]
           ,[SALEPRICE]
           ,[SPECIAL_HSCODE_VAL]
           ,[PSPECIAL_HSCODE]
           ,[PSPECIAL_HSCODE_VAL]
           ,[NBHD_IMP]
           ,[NBHD_LAND]
           ,[NBHD_LOC]
           ,[FLPACODE1]
           ,[FLPAVALUE1]
           ,[FLPACODE2]
           ,[FLPAVALUE2]
           ,[FLPACODE3]
           ,[FLPAVALUE3]
           ,[FLPACODE4]
           ,[FLPAVALUE4]
           ,[FLPACODE5]
           ,[FLPAVALUE5]
           ,[FLPACODE6]
           ,[FLPAVALUE6]
           ,[FLPACODE7]
           ,[FLPAVALUE7]
           ,[FLPACODE8]
           ,[FLPAVALUE8]
           ,[FLPACODE9]
           ,[FLPAVALUE9]
           ,[FLPACODE10]
           ,[FLPAVALUE10]
           ,[FLPAAPPNUM]
           ,[FLPA_APPROVED]
           ,[FLPA_DATE]
           ,[FLPA_REASON]
           ,[FVALUE1]
           ,[JVALUE1]
           ,[FLFMV1]
           ,[FLPADJ1]
           ,[FLINDEX1]
           ,[FVALUE2]
           ,[JVALUE2]
           ,[FLFMV2]
           ,[FLPADJ2]
           ,[FLINDEX2]
           ,[FVALUE3]
           ,[JVALUE3]
           ,[FLFMV3]
           ,[FLPADJ3]
           ,[FLINDEX3]
           ,[FVALUE4]
           ,[JVALUE4]
           ,[FLFMV4]
           ,[FLPADJ4]
           ,[FLINDEX4]
           ,[FVALUE5]
           ,[JVALUE5]
           ,[FLFMV5]
           ,[FLPADJ5]
           ,[FLINDEX5]
           ,[FVALUE6]
           ,[JVALUE6]
           ,[FLFMV6]
           ,[FLPADJ6]
           ,[FLINDEX6]
           ,[FVALUE7]
           ,[JVALUE7]
           ,[FLFMV7]
           ,[FLPADJ7]
           ,[FLINDEX7]
           ,[FVALUE8]
           ,[JVALUE8]
           ,[FLFMV8]
           ,[FLPADJ8]
           ,[FLINDEX8]
           ,[FVALUE9]
           ,[JVALUE9]
           ,[FLFMV9]
           ,[FLPADJ9]
           ,[FLINDEX9]
           ,[FVALUE10]
           ,[JVALUE10]
           ,[FLFMV10]
           ,[FLPADJ10]
           ,[FLINDEX10]
           ,[FVALUE11]
           ,[JVALUE11]
           ,[FLFMV11]
           ,[FLPADJ11]
           ,[FLINDEX11]
           ,[FVALUE12]
           ,[JVALUE12]
           ,[FLFMV12]
           ,[FLPADJ12]
           ,[FLINDEX12]
           ,[FVALUE13]
           ,[JVALUE13]
           ,[FLFMV13]
           ,[FLPADJ13]
           ,[FLINDEX13]
           ,[FVALUE14]
           ,[JVALUE14]
           ,[FLFMV14]
           ,[FLPADJ14]
           ,[FLINDEX14]
           ,[FVALUE15]
           ,[JVALUE15]
           ,[FLFMV15]
           ,[FLPADJ15]
           ,[FLINDEX15]
           ,[TACODE1]
           ,[TAVAL1]
           ,[TACODE2]
           ,[TAVAL2]
           ,[TACODE3]
           ,[TAVAL3]
           ,[TACODE4]
           ,[TAVAL4]
           ,[TACODE5]
           ,[TAVAL5]
           ,[TACODE6]
           ,[TAVAL6]
           ,[TACODE7]
           ,[TAVAL7]
           ,[TACODE8]
           ,[TAVAL8]
           ,[TACODE9]
           ,[TAVAL9]
           ,[TACODE10]
           ,[TAVAL10]
           ,[BANKRUPT]
           ,[BANKRUPT_DATE]
           ,[SALECODE1]
           ,[SALEVAL1]
           ,[SALECODE2]
           ,[SALEVAL2]
           ,[SALECODE3]
           ,[SALEVAL3]
           ,[SALECODE4]
           ,[SALEVAL4]
           ,[SALECODE5]
           ,[SALEVAL5]
           ,[SALECODE6]
           ,[SALEVAL6]
           ,[SALECODE7]
           ,[SALEVAL7]
           ,[SALECODE8]
           ,[SALEVAL8]
           ,[SALECODE9]
           ,[SALEVAL9]
           ,[SALECODE10]
           ,[SALEVAL10]
           ,[SB346VAL]
           ,[REVIEW_DATE]
           ,[FLAT_CHG3])
SELECT 
SUBSTRING(RAWDATA,1,6)
, SUBSTRING(RAWDATA,7,3)
, SUBSTRING(RAWDATA,10,2)
, SUBSTRING(RAWDATA,12,5)
, SUBSTRING(RAWDATA,17,5)
, SUBSTRING(RAWDATA,22,3)
, SUBSTRING(RAWDATA,25,3)
, SUBSTRING(RAWDATA,28,24)
, SUBSTRING(RAWDATA,52,24)
, SUBSTRING(RAWDATA,76,24)
, SUBSTRING(RAWDATA,100,24)
, SUBSTRING(RAWDATA,124,13)
, SUBSTRING(RAWDATA,137,2)
, SUBSTRING(RAWDATA,139,9)
, SUBSTRING(RAWDATA,148,25)
, SUBSTRING(RAWDATA,173,20)
, SUBSTRING(RAWDATA,193,5)
, SUBSTRING(RAWDATA,198,20)
, SUBSTRING(RAWDATA,218,4)
, SUBSTRING(RAWDATA,222,5)
, SUBSTRING(RAWDATA,227,7)
, SUBSTRING(RAWDATA,234,18)
, SUBSTRING(RAWDATA,252,4)
, SUBSTRING(RAWDATA,256,4)
, SUBSTRING(RAWDATA,260,4)
, SUBSTRING(RAWDATA,264,4)
, SUBSTRING(RAWDATA,268,6)
, SUBSTRING(RAWDATA,274,1)
, SUBSTRING(RAWDATA,275,1)
, SUBSTRING(RAWDATA,276,8)
, SUBSTRING(RAWDATA,284,8)
, SUBSTRING(RAWDATA,292,8)
, SUBSTRING(RAWDATA,300,8)
, SUBSTRING(RAWDATA,308,2)
, SUBSTRING(RAWDATA,310,10)
, SUBSTRING(RAWDATA,320,4)
, SUBSTRING(RAWDATA,324,10)
, SUBSTRING(RAWDATA,334,10)
, SUBSTRING(RAWDATA,344,6)
, SUBSTRING(RAWDATA,350,6)
, SUBSTRING(RAWDATA,356,1)
, SUBSTRING(RAWDATA,357,1)
, SUBSTRING(RAWDATA,358,1)
, SUBSTRING(RAWDATA,359,1)
, SUBSTRING(RAWDATA,360,1)
, SUBSTRING(RAWDATA,361,1)
, SUBSTRING(RAWDATA,362,4)
, SUBSTRING(RAWDATA,366,1)
, SUBSTRING(RAWDATA,367,1)
, SUBSTRING(RAWDATA,368,4)
, SUBSTRING(RAWDATA,372,10)
, SUBSTRING(RAWDATA,382,3)
, SUBSTRING(RAWDATA,385,3)
, SUBSTRING(RAWDATA,388,3)
, SUBSTRING(RAWDATA,391,1)
, SUBSTRING(RAWDATA,392,2)
, SUBSTRING(RAWDATA,394,2)
, SUBSTRING(RAWDATA,396,10)
, SUBSTRING(RAWDATA,406,2)
, SUBSTRING(RAWDATA,408,10)
, SUBSTRING(RAWDATA,418,2)
, SUBSTRING(RAWDATA,420,10)
, SUBSTRING(RAWDATA,430,2)
, SUBSTRING(RAWDATA,432,10)
, SUBSTRING(RAWDATA,442,2)
, SUBSTRING(RAWDATA,444,10)
, SUBSTRING(RAWDATA,454,2)
, SUBSTRING(RAWDATA,456,10)
, SUBSTRING(RAWDATA,466,2)
, SUBSTRING(RAWDATA,468,10)
, SUBSTRING(RAWDATA,478,2)
, SUBSTRING(RAWDATA,480,10)
, SUBSTRING(RAWDATA,490,2)
, SUBSTRING(RAWDATA,492,10)
, SUBSTRING(RAWDATA,502,2)
, SUBSTRING(RAWDATA,504,10)
, SUBSTRING(RAWDATA,514,9)
, SUBSTRING(RAWDATA,523,9)
, SUBSTRING(RAWDATA,532,6)
, SUBSTRING(RAWDATA,538,18)
, SUBSTRING(RAWDATA,556,5)
, SUBSTRING(RAWDATA,561,5)
, SUBSTRING(RAWDATA,566,3)
, SUBSTRING(RAWDATA,569,3)
, SUBSTRING(RAWDATA,572,2)
, SUBSTRING(RAWDATA,574,2)
, SUBSTRING(RAWDATA,576,2)
, SUBSTRING(RAWDATA,578,5)
, SUBSTRING(RAWDATA,583,3)
, SUBSTRING(RAWDATA,586,3)
, SUBSTRING(RAWDATA,589,3)
, SUBSTRING(RAWDATA,592,3)
, SUBSTRING(RAWDATA,595,3)
, SUBSTRING(RAWDATA,598,3)
, SUBSTRING(RAWDATA,601,3)
, SUBSTRING(RAWDATA,604,3)
, SUBSTRING(RAWDATA,607,3)
, SUBSTRING(RAWDATA,610,3)
, SUBSTRING(RAWDATA,613,10)
, SUBSTRING(RAWDATA,623,3)
, SUBSTRING(RAWDATA,626,8)
, SUBSTRING(RAWDATA,634,8)
, SUBSTRING(RAWDATA,642,10)
, SUBSTRING(RAWDATA,652,1)
, SUBSTRING(RAWDATA,653,10)
, SUBSTRING(RAWDATA,663,10)
, SUBSTRING(RAWDATA,673,10)
, SUBSTRING(RAWDATA,683,10)
, SUBSTRING(RAWDATA,693,10)
, SUBSTRING(RAWDATA,703,12)
, SUBSTRING(RAWDATA,715,12)
, SUBSTRING(RAWDATA,727,2)
, SUBSTRING(RAWDATA,729,10)
, SUBSTRING(RAWDATA,739,2)
, SUBSTRING(RAWDATA,741,10)
, SUBSTRING(RAWDATA,751,2)
, SUBSTRING(RAWDATA,753,10)
, SUBSTRING(RAWDATA,763,2)
, SUBSTRING(RAWDATA,765,10)
, SUBSTRING(RAWDATA,775,2)
, SUBSTRING(RAWDATA,777,10)
, SUBSTRING(RAWDATA,787,2)
, SUBSTRING(RAWDATA,789,10)
, SUBSTRING(RAWDATA,799,2)
, SUBSTRING(RAWDATA,801,10)
, SUBSTRING(RAWDATA,811,2)
, SUBSTRING(RAWDATA,813,10)
, SUBSTRING(RAWDATA,823,2)
, SUBSTRING(RAWDATA,825,10)
, SUBSTRING(RAWDATA,835,2)
, SUBSTRING(RAWDATA,837,10)
, SUBSTRING(RAWDATA,847,2)
, SUBSTRING(RAWDATA,849,10)
, SUBSTRING(RAWDATA,859,2)
, SUBSTRING(RAWDATA,861,10)
, SUBSTRING(RAWDATA,871,2)
, SUBSTRING(RAWDATA,873,10)
, SUBSTRING(RAWDATA,883,2)
, SUBSTRING(RAWDATA,885,10)
, SUBSTRING(RAWDATA,895,2)
, SUBSTRING(RAWDATA,897,10)
, SUBSTRING(RAWDATA,907,2)
, SUBSTRING(RAWDATA,909,10)
, SUBSTRING(RAWDATA,919,2)
, SUBSTRING(RAWDATA,921,10)
, SUBSTRING(RAWDATA,931,2)
, SUBSTRING(RAWDATA,933,10)
, SUBSTRING(RAWDATA,943,2)
, SUBSTRING(RAWDATA,945,10)
, SUBSTRING(RAWDATA,955,2)
, SUBSTRING(RAWDATA,957,10)
, SUBSTRING(RAWDATA,967,1)
, SUBSTRING(RAWDATA,968,10)
, SUBSTRING(RAWDATA,978,1)
, SUBSTRING(RAWDATA,979,1)
, SUBSTRING(RAWDATA,980,2)
, SUBSTRING(RAWDATA,982,2)
, SUBSTRING(RAWDATA,984,5)
, SUBSTRING(RAWDATA,989,10)
, SUBSTRING(RAWDATA,999,2)
, SUBSTRING(RAWDATA,1001,4)
, SUBSTRING(RAWDATA,1005,10)
, SUBSTRING(RAWDATA,1015,10)
, SUBSTRING(RAWDATA,1025,10)
, SUBSTRING(RAWDATA,1035,10)
, SUBSTRING(RAWDATA,1045,4)
, SUBSTRING(RAWDATA,1049,9)
, SUBSTRING(RAWDATA,1058,10)
, SUBSTRING(RAWDATA,1068,1)
, SUBSTRING(RAWDATA,1069,10)
, SUBSTRING(RAWDATA,1079,5)
, SUBSTRING(RAWDATA,1084,5)
, SUBSTRING(RAWDATA,1089,5)
, SUBSTRING(RAWDATA,1094,2)
, SUBSTRING(RAWDATA,1096,10)
, SUBSTRING(RAWDATA,1106,2)
, SUBSTRING(RAWDATA,1108,10)
, SUBSTRING(RAWDATA,1118,2)
, SUBSTRING(RAWDATA,1120,10)
, SUBSTRING(RAWDATA,1130,2)
, SUBSTRING(RAWDATA,1132,10)
, SUBSTRING(RAWDATA,1142,2)
, SUBSTRING(RAWDATA, 114,10)
, SUBSTRING(RAWDATA,1154,2)
, SUBSTRING(RAWDATA,1156,10)
, SUBSTRING(RAWDATA,1166,2)
, SUBSTRING(RAWDATA,1168,10)
, SUBSTRING(RAWDATA,1178,2)
, SUBSTRING(RAWDATA,1180,10)
, SUBSTRING(RAWDATA,1190,2)
, SUBSTRING(RAWDATA,1192,10)
, SUBSTRING(RAWDATA,1202,2)
, SUBSTRING(RAWDATA,1204,10)
, SUBSTRING(RAWDATA,1214,12)
, SUBSTRING(RAWDATA,1226,1)
, SUBSTRING(RAWDATA,1227,8)
, SUBSTRING(RAWDATA,1235,3)
, SUBSTRING(RAWDATA,1238,10)
, SUBSTRING(RAWDATA,1248,10)
, SUBSTRING(RAWDATA,1258,10)
, SUBSTRING(RAWDATA,1268,10)
, SUBSTRING(RAWDATA,1278,6)
, SUBSTRING(RAWDATA,1284,10)
, SUBSTRING(RAWDATA,1294,10)
, SUBSTRING(RAWDATA,1304,10)
, SUBSTRING(RAWDATA,1314,10)
, SUBSTRING(RAWDATA,1324,6)
, SUBSTRING(RAWDATA,1330,10)
, SUBSTRING(RAWDATA,1340,10)
, SUBSTRING(RAWDATA,1350,10)
, SUBSTRING(RAWDATA,1360,10)
, SUBSTRING(RAWDATA,1370,6)
, SUBSTRING(RAWDATA,1376,10)
, SUBSTRING(RAWDATA,1386,10)
, SUBSTRING(RAWDATA,1396,10)
, SUBSTRING(RAWDATA,1406,10)
, SUBSTRING(RAWDATA,1416,6)
, SUBSTRING(RAWDATA,1422,10)
, SUBSTRING(RAWDATA,1432,10)
, SUBSTRING(RAWDATA,1442,10)
, SUBSTRING(RAWDATA,1452,10)
, SUBSTRING(RAWDATA,1462,6)
, SUBSTRING(RAWDATA,1468,10)
, SUBSTRING(RAWDATA,1478,10)
, SUBSTRING(RAWDATA,1488,10)
, SUBSTRING(RAWDATA,1498,10)
, SUBSTRING(RAWDATA,1508,6)
, SUBSTRING(RAWDATA,1514,10)
, SUBSTRING(RAWDATA,1524,10)
, SUBSTRING(RAWDATA,1534,10)
, SUBSTRING(RAWDATA,1544,10)
, SUBSTRING(RAWDATA,1554,6)
, SUBSTRING(RAWDATA,1560,10)
, SUBSTRING(RAWDATA,1570,10)
, SUBSTRING(RAWDATA,1580,10)
, SUBSTRING(RAWDATA,1590,10)
, SUBSTRING(RAWDATA,1600,6)
, SUBSTRING(RAWDATA,1606,10)
, SUBSTRING(RAWDATA,1616,10)
, SUBSTRING(RAWDATA,1626,10)
, SUBSTRING(RAWDATA,1636,10)
, SUBSTRING(RAWDATA,1646,6)
, SUBSTRING(RAWDATA,1652,10)
, SUBSTRING(RAWDATA,1662,10)
, SUBSTRING(RAWDATA,1672,10)
, SUBSTRING(RAWDATA,1682,10)
, SUBSTRING(RAWDATA,1692,6)
, SUBSTRING(RAWDATA,1698,10)
, SUBSTRING(RAWDATA,1708,10)
, SUBSTRING(RAWDATA,1718,10)
, SUBSTRING(RAWDATA,1728,10)
, SUBSTRING(RAWDATA,1738,6)
, SUBSTRING(RAWDATA,1744,10)
, SUBSTRING(RAWDATA,1754,10)
, SUBSTRING(RAWDATA,1764,10)
, SUBSTRING(RAWDATA,1774,10)
, SUBSTRING(RAWDATA,1784,6)
, SUBSTRING(RAWDATA,1790,10)
, SUBSTRING(RAWDATA,1800,10)
, SUBSTRING(RAWDATA,1810,10)
, SUBSTRING(RAWDATA,1820,10)
, SUBSTRING(RAWDATA,1830,6)
, SUBSTRING(RAWDATA,1836,10)
, SUBSTRING(RAWDATA,1846,10)
, SUBSTRING(RAWDATA,1856,10)
, SUBSTRING(RAWDATA,1866,10)
, SUBSTRING(RAWDATA,1876,6)
, SUBSTRING(RAWDATA,1882,10)
, SUBSTRING(RAWDATA,1892,10)
, SUBSTRING(RAWDATA,1902,10)
, SUBSTRING(RAWDATA,1912,10)
, SUBSTRING(RAWDATA,1922,6)
, SUBSTRING(RAWDATA,1928,2)
, SUBSTRING(RAWDATA,  19,10      )
, SUBSTRING(RAWDATA,1940,2)
, SUBSTRING(RAWDATA,1942,10)
, SUBSTRING(RAWDATA,1952,2)
, SUBSTRING(RAWDATA,1954,10)
, SUBSTRING(RAWDATA,1964,2)
, SUBSTRING(RAWDATA,1966,10)
, SUBSTRING(RAWDATA,1976,2)
, SUBSTRING(RAWDATA,1978,10)
, SUBSTRING(RAWDATA,1988,2)
, SUBSTRING(RAWDATA,1990,10)
, SUBSTRING(RAWDATA,2000,2)
, SUBSTRING(RAWDATA,2002,10)
, SUBSTRING(RAWDATA,2012,2)
, SUBSTRING(RAWDATA,2014,10)
, SUBSTRING(RAWDATA,2024,2)
, SUBSTRING(RAWDATA,2026,10)
, SUBSTRING(RAWDATA,2036,2)
, SUBSTRING(RAWDATA,2038,10)
, SUBSTRING(RAWDATA,2048,1)
, SUBSTRING(RAWDATA,2049,8)
, SUBSTRING(RAWDATA,2056,2)
, SUBSTRING(RAWDATA,2059,10)
, SUBSTRING(RAWDATA,2069,2)
, SUBSTRING(RAWDATA,2071,10)
, SUBSTRING(RAWDATA,2081,2)
, SUBSTRING(RAWDATA,2083,10)
, SUBSTRING(RAWDATA,2093,2)
, SUBSTRING(RAWDATA,2095,10)
, SUBSTRING(RAWDATA,2105,2)
, SUBSTRING(RAWDATA,2107,10)
, SUBSTRING(RAWDATA,2117,2)
, SUBSTRING(RAWDATA,2119,10)
, SUBSTRING(RAWDATA,2129,2)
, SUBSTRING(RAWDATA,2131,10)
, SUBSTRING(RAWDATA,2141,2)
, SUBSTRING(RAWDATA,2143,10)
, SUBSTRING(RAWDATA,2153,2)
, SUBSTRING(RAWDATA,2155,10)
, SUBSTRING(RAWDATA,2165,2)
, SUBSTRING(RAWDATA,2167,10)
, SUBSTRING(RAWDATA,2177,10)
, SUBSTRING(RAWDATA,2187,8)
, SUBSTRING(RAWDATA,2195,8)
FROM IMPORT_PARCEL


truncate table dbo.ptcmts
INSERT INTO [dbo].[PTCMTS]
           ([TAX_YEAR]
           ,[ACCT_NO]
           ,[LINE_NO]
           ,[PAGE_NO]
           ,[COMMENT1]
           ,[COMMENT2]
           ,[COMMENT3]
           ,[COMMENT4]
           ,[COMMENT5]
           ,[COMMENT6]
           ,[COMMENT7])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,3)
, SUBSTRING(RAWDATA,14,2)
, SUBSTRING(RAWDATA,16,70)
, SUBSTRING(RAWDATA,86,70)
, SUBSTRING(RAWDATA,156,70)
, SUBSTRING(RAWDATA,226,70)
, SUBSTRING(RAWDATA,296,70)
, SUBSTRING(RAWDATA,366,70)
, SUBSTRING(RAWDATA,436,70)
FROM IMPORT_PTCMTS


truncate table dbo.timber
INSERT INTO [dbo].[TIMBER]
           ([TAX_YEAR]
           ,[ACCT_NO]
           ,[OWNER_NAME]
           ,[OWNER_ADD1]
           ,[OWNER_ADD2]
           ,[OWNER_ADD3]
           ,[OWNER_CITY]
           ,[OWNER_STATE]
           ,[OWNER_ZIP]
           ,[PUR_NAME]
           ,[PUR_ADD1]
           ,[PUR_ADD2]
           ,[PUR_ADD3]
           ,[PUR_CITY]
           ,[PUR_STATE]
           ,[PUR_ZIP]
           ,[QUARTER]
           ,[TIMBERTYPE]
           ,[LOCATION]
           ,[ACRES]
           ,[PARCEL_NO]
           ,[DIGEST_NAME]
           ,[SWPW]
           ,[SWCS]
           ,[SWST]
           ,[SWPL]
           ,[SWPO]
           ,[SWFC]
           ,[SWFW]
           ,[HWPW]
           ,[HWST]
           ,[HWPO]
           ,[HWFC]
           ,[HWFW]
           ,[PUR_DATE]
           ,[CHECKED]
           ,[TAXDISTRIC]
           ,[RETURN_VAL]
           ,[FMV]
           ,[PUR_RPT_DATE]
           ,[SELL_RPT_DATE]
           ,[DUE_DATE]
           ,[RESIDENT])
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,24)
, SUBSTRING(RAWDATA,35,24)
, SUBSTRING(RAWDATA,59,24)
, SUBSTRING(RAWDATA,83,24)
, SUBSTRING(RAWDATA,107,13)
, SUBSTRING(RAWDATA,120,2)
, SUBSTRING(RAWDATA,122,9)
, SUBSTRING(RAWDATA,131,24)
, SUBSTRING(RAWDATA,155,24)
, SUBSTRING(RAWDATA,179,24)
, SUBSTRING(RAWDATA,203,24)
, SUBSTRING(RAWDATA,227,13)
, SUBSTRING(RAWDATA,238,2)
, SUBSTRING(RAWDATA,242,9)
, SUBSTRING(RAWDATA,251,1)
, SUBSTRING(RAWDATA,252,1)
, SUBSTRING(RAWDATA,253,37)
, SUBSTRING(RAWDATA,290,8)
, SUBSTRING(RAWDATA,298,16)
, SUBSTRING(RAWDATA,314,24)
, SUBSTRING(RAWDATA,338,10)
, SUBSTRING(RAWDATA,348,10)
, SUBSTRING(RAWDATA,358,10)
, SUBSTRING(RAWDATA,368,10)
, SUBSTRING(RAWDATA,378,10)
, SUBSTRING(RAWDATA,388,10)
, SUBSTRING(RAWDATA,398,10)
, SUBSTRING(RAWDATA,408,10)
, SUBSTRING(RAWDATA,418,10)
, SUBSTRING(RAWDATA,428,10)
, SUBSTRING(RAWDATA,438,10)
, SUBSTRING(RAWDATA,448,10)
, SUBSTRING(RAWDATA,458,8)
, SUBSTRING(RAWDATA,466,1)
, SUBSTRING(RAWDATA,467,2)
, SUBSTRING(RAWDATA,469,8)
, SUBSTRING(RAWDATA,477,8)
, SUBSTRING(RAWDATA,485,8)
, SUBSTRING(RAWDATA,493,8)
, SUBSTRING(RAWDATA,501,8)
, SUBSTRING(RAWDATA,509,1)
FROM IMPORT_TIMBER


truncate table dbo.HDEQUIP
INSERT INTO [dbo].HDEQUIP
           (TAX_YEAR
			, ACCT_NO
			, OWNER_NAME
			, OWNER_ADD1
			, OWNER_ADD2
			, OWNER_ADD3
			, OWNER_CITY
			, OWNER_STATE
			, OWNER_ZIP
			, TAXDISTRIC
			, FMV
			, PUR_DATE
			, DUE_DATE
			, YEARBUILT
			, MFG
			, MODEL
			, DESCRIP
			, SERIALNUM
			, CO_NUM
			, NEW_USED
			)
SELECT 
SUBSTRING(RAWDATA,1,4)
, SUBSTRING(RAWDATA,5,6)
, SUBSTRING(RAWDATA,11,24)
, SUBSTRING(RAWDATA,35,24)
, SUBSTRING(RAWDATA,59,24)
, SUBSTRING(RAWDATA,83,24)
, SUBSTRING(RAWDATA,107,13)
, SUBSTRING(RAWDATA,120,2)
, SUBSTRING(RAWDATA,122,9)
, SUBSTRING(RAWDATA,131,2)
, SUBSTRING(RAWDATA,133,11)
, SUBSTRING(RAWDATA,144,8)
, SUBSTRING(RAWDATA,152,8)
, SUBSTRING(RAWDATA,160,4)
, SUBSTRING(RAWDATA,164,12)
, SUBSTRING(RAWDATA,176,10)
, SUBSTRING(RAWDATA,186,35)
, SUBSTRING(RAWDATA,221,22)
, SUBSTRING(RAWDATA,243,3)
, SUBSTRING(RAWDATA,246,1)
FROM IMPORT_HDE