SSIS date manipulation

  • hi 

    hoping for some inspiration !

    i am pivoting out data from .csv into one record in a sql table using ssis 

    Sample:
    "VarName","TimeString","VarValue","Validity","Time_ms"
    "KPIV\Mixer.Wet_Target_Kg","03/03/2017 07:06:52",109,1,42797296438.7731
    "KPIV\Mixer.Product","03/03/2017 07:09:18",9,1,42797298124.0162
    "KPIV\Mixer.Week","03/03/2017 07:09:18",9,1,42797298124.0162

    Varname is the entry which i am creating new columns for, and VarValue is the value it has
    which is working great apart from the times where TimeString is different, i then get 2 records as i would expect..

    does anyone have an idea on how to sample the dates into an average? or how i could take the lowest date and apply that to all values?

    any ideas appreciated!

    mal

  • Looks like it may be better to move that data to a staging table first (in its native format, as per the input file) and then use T-SQL to manipulate it.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • hi Phil

    i think you are right! got a query working to pivot my data out as i want

    thanks

    mal

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

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