March 3, 2017 at 5:58 am
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
March 3, 2017 at 6:34 am
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.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 6, 2017 at 8:30 am
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