Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody.
I have a table with a timestamp field. Processing the data, I am recovering the HOUR value from this field.
I have also another table with fields like: hour_0, hour_1... hour_23.
My question is: is there any way of converting the calculated hour from timestamp into the target column in order to insert a value? For instance, if the hour is 13 then I want to insert the new value in hour_13 from the final table.
I am pretty new using TOD and this is driving me crazy. Could you please help me?
Thanks in advance.
Thanks for your response, but I think I did not explain the problem properly, sorry, I will try it again:
I have a table with several rows. In every row there is a timestamp refering to an hour of a day and a value:
ID:01 - 2020/01/01 00:00 - VAL000
ID:02 - 2020/01/01 01:00 - VAL001
ID:03 - 2020/01/01 02:00 - VAL002
... (and so on)
I also have another table in which I have to insert the value from each hour in a column for this hour. The table is like:
ID - YEAR - MONTH- DAY - HOUR_0 - HOUR_1 - HOUR_2 ... HOUR_23
I need to manage data in order to insert:
1 - 2020 - 01 - 01 - VAL000 - VAL001 - VAL002 - VAL003...
I mean, I try to "convert" several rows in columns, more or less.
I hope now it is better explained.
Thanks.