Problem with Data conversions from csv and txt files

  • I am trying to convert some date columns I have in text files and .csv files but I keep getting errors through SSIS. The format the dates are in is '19700908'.

    I have tried converting them with all the available date types in SSIS, which are DT_DATE, DT_DBDATE, DT_DBTIME, and DT_DBTIMESTAMP.

    All I keep getting is this error:

    [Data Conversion [1339]] Error: Data conversion failed while converting column "Column 10" (1556) to column "dob" (1377). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

    Flat File Source > Sort > Data Conversion > Lookup > SQL Server Destination

    Is there a way to remedy this problem?

  • In this same table I also have to make 2 of the columns equal to another column, which I am also having trouble with. I am somewhat new to SSIS obviously.

    Here is the situation:

    deduc_no_of_deduc * deduc_amt_per_deduc

    These 2 columns need to be inserted into another column called 'deduc_annual_amt', which is in the same table. Is there a way to do this as well?

    I have done insert statements but none of them work properly. Here is the table setup.

    [dbo].[emp_deduc]

    (

    [deduc_id] [int] IDENTITY(1,1) NOT NULL,

    [pgb_id] [int] NOT NULL,

    [deduc_payroll_id] [varchar](25) NULL,

    [deduc_amt_per_deduc] [money] NULL,

    [deduc_no_of_deduc] [varchar](25) NULL,

    [deduc_tax_status] [varchar](25) NULL,

    [deduc_coverage] [varchar](25) NULL,

    [deduc_cov_conf_timestamp] [varchar](25) NULL,

    [dep_care_ben_id] [varchar](20) NULL,

    [dep_care_per_amt] [money] NULL,

    [dep_care_ann_amt] [money] NULL,

    [med_rem_ben_id] [varchar](20) NULL,

    [med_rem_per_amt] [money] NULL,

    [med_rem_ann_amt] [money] NULL,

    [card_ben_id] [varchar](20) NULL,

    [card_per_amt] [money] NULL,

    [card_ann_amt] [money] NULL

    )

  • I actually figured out the column issue I was having but I am still having no luck with the date conversions. =\

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply