Hi all,
i just get in to this world, i apologize all mistake i might do.
i have tow tables, one
ID order Qty
1 500 1
2 500-1 2
3 400 1
2nd table
order_id status
500 ok
500-1 ok
500-1 ok
400 ok
i wanna wright quarry how many qty finish from table one. table tow get information out of scanning. if you see table tow i have tow rows 500-1 because of tow Qty, wen i wanna see result i would line to see how many Qty done so far.
Thank you in advanced.
Sort table with quarry
Sort table with quarry
Windows 7 64-bit
open office 4.1.4
open office 4.1.4
-
- Volunteer
- Posts: 1548
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: sort table with quarry
Welcome to the the forum.
Sorry but the structure of your tables isn't clear, but it appears you want to generate a running total. That requires a sub query something like
If you need further help with this please upload a sample database.
viewtopic.php?f=74&t=8289
Sorry but the structure of your tables isn't clear, but it appears you want to generate a running total. That requires a sub query something like
Code: Select all
SELECT "TA"."ID", "TA"."Qty"
, (SELECT SUM("S"."QTY") FROM "TableA" AS "S" WHERE "S"."ID" <= "TA"."ID") AS "Running Total"
FROM "TableA" AS "TA"
viewtopic.php?f=74&t=8289
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11