I have a table where I need to calculate changes based on time period and some conditions .
I made two new columns time1 and time2. time1 and time 2 have values of 04 , 05, 06 based on certain rules.
Here is the new table structure
id target04 target05 target08 time1 time2 change
1 25.6 34.6 56.7 04 05
2 20.6 34.6 56.7 04 08
change for id 1 = target05-target04
change for id 2 = target08-target04
I need to calculate change column between target columns based on time columns
update table x set change = "target"&time2-"target"&time1 ;
I get an error. Is there a special syntax?
I made two new columns time1 and time2. time1 and time 2 have values of 04 , 05, 06 based on certain rules.
Here is the new table structure
id target04 target05 target08 time1 time2 change
1 25.6 34.6 56.7 04 05
2 20.6 34.6 56.7 04 08
change for id 1 = target05-target04
change for id 2 = target08-target04
I need to calculate change column between target columns based on time columns
update table x set change = "target"&time2-"target"&time1 ;
I get an error. Is there a special syntax?