Hello all experts,
I'm new to access (use excel but in this case the amount of data is to big...) and I need to do something like this:
I have a database with the following configuration:
ID DATE HOUR NAME fullNAME VALUE RES1 RES2 RES3 00H 01H 02H 03H 04H 05H .... TO 24H
1 09-05-2012 0 Car1 BIGCAR1 50 0 0 0
2 09-05-2012 1 Car2 BIGCAR2 45.5 0 1 1
3 09-05-2012 0 Car3 BIGCAR3 20.7 1 1 0
4 09-05-2012 3 Car3 BIGCAR3 68.5 0 0 0
5 09-05-2012 1 Car4 BIGCAR4 68.5 0 1 0
6 09-05-2012 5 Car2 BIGCAR2 68.5 0 0 1
7 09-05-2012 1 Car1 BIGCAR1 68.5 0 1 0
8 09-05-2012 4 Car2 BIGCAR2 68.5 1 0 0
9 09-05-2012 1 Car4 BIGCAR4 68.5 0 0 0
What I need is to insert thexample.txte value from res1,res2 or res3 (if any of the 3 have 1 then the new value is 1, else is 0) in the hours columns (00h to 23h) based on the HOUR column.
So it would become something like this:
ID DATE HOUR NAME fullNAME VALUE RES1 RES2 RES3 00H 01H 02H 03H 04H 05H .... TO 24H
1 09-05-2012 0 Car1 BIGCAR1 50 0 0 0 0
2 09-05-2012 1 Car2 BIGCAR2 45.5 0 1 1 1
3 09-05-2012 0 Car3 BIGCAR3 20.7 1 1 0 1
4 09-05-2012 3 Car3 BIGCAR3 68.5 0 0 0 0
5 09-05-2012 1 Car4 BIGCAR4 68.5 0 1 0 1
6 09-05-2012 5 Car2 BIGCAR2 68.5 0 0 1 1
7 09-05-2012 1 Car1 BIGCAR1 68.5 0 1 0 1
8 09-05-2012 4 Car2 BIGCAR2 68.5 1 0 0 1
9 09-05-2012 1 Car4 BIGCAR4 68.5 0 0 0 0
I know I can try a TRANSFORM, the thing is that I dont want to change the layout... I tried some basic querys but in this case I thing a much more complicated programming is required...
Could please someone point me in the right direction?
example file formatted with notepad++
Thanks for any help![]()