kamaldoctor
New member
- Local time
- Today, 16:22
- Joined
- May 4, 2013
- Messages
- 13
Hi All,
I have been struggling to write a query which will give me following results in field DistTotal as shown where:
RefNo field is variable
For placing 1 Default of DistTotal Value = 0
For placing 2 Default of DistTotal Value = Lenghth Value of placing 1
For placing 3 Default of DistTotal Value = Lenghth Value of placing 1 + placing 2
For placing 4 Default of DistTotal Value = Lenghth Value of placing 1 + placing 2 + placing3
so on & on & on…….till Placing is 30….
placing HName Length DistTotal RefNo
1 DREAMLINER 5.50 0 366
1 PRINCE ARIUS 1.75 0 356
2 TWITTILLATOR 0.05 1.75 356
2 SPEED BABY 0.75 5.50 366
3 BETHLEHEM 1.75 6.25 366
3 DAREDEVIL 1.5 1.80 356
4 STYLISH STROKES 0.75 8.00 366
4 MIRACLE OF MERCY 0.20 3.3 35
Please guide me how to write the query to achieve above results.
Thanks a Ton.
I have been struggling to write a query which will give me following results in field DistTotal as shown where:
RefNo field is variable
For placing 1 Default of DistTotal Value = 0
For placing 2 Default of DistTotal Value = Lenghth Value of placing 1
For placing 3 Default of DistTotal Value = Lenghth Value of placing 1 + placing 2
For placing 4 Default of DistTotal Value = Lenghth Value of placing 1 + placing 2 + placing3
so on & on & on…….till Placing is 30….
placing HName Length DistTotal RefNo
1 DREAMLINER 5.50 0 366
1 PRINCE ARIUS 1.75 0 356
2 TWITTILLATOR 0.05 1.75 356
2 SPEED BABY 0.75 5.50 366
3 BETHLEHEM 1.75 6.25 366
3 DAREDEVIL 1.5 1.80 356
4 STYLISH STROKES 0.75 8.00 366
4 MIRACLE OF MERCY 0.20 3.3 35
Please guide me how to write the query to achieve above results.
Thanks a Ton.