![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to get all the records (including dubblets) in DB1 and then get the Count to summerize a total count. Then I want to calc the total Count with Price (without dubblets). |
|
_a | CALC SUM | |
|
_a | | Check | |
#3
| |||
| |||
|
|
Hotmail.com> wrote: I want to get all the records (including dubblets) in DB1 and then get the Count to summerize a total count. Then I want to calc the total Count with Price (without dubblets). This is easy if BarCode is unique in DB2: Untested, but: SELECT a.BarCode, SUM(a."Count") AS TotalCount, b.Price FROM DB1 a INNER JOIN DB2 b on (a.Barcode = b.Barcode) GROUP BY BarCode, Price or DB1 | BarCode | Count | | _a | CALC SUM | DB2 | Barcode | Text | Price | | _a | | Check | If this isn't what you're looking for, let us know. It's best if you post some sample data (as text, not attachments) and what the corresponding answer table would be. |
#4
| |||
| |||
|
|
Hotmail.com> wrote: I want to get all the records (including dubblets) in DB1 and then get the Count to summerize a total count. Then I want to calc the total Count with Price (without dubblets). This is easy if BarCode is unique in DB2: Untested, but: SELECT a.BarCode, SUM(a."Count") AS TotalCount, b.Price FROM DB1 a INNER JOIN DB2 b on (a.Barcode = b.Barcode) GROUP BY BarCode, Price or DB1 | BarCode | Count | | _a | CALC SUM | DB2 | Barcode | Text | Price | | _a | | Check | If this isn't what you're looking for, let us know. It's best if you post some sample data (as text, not attachments) and what the corresponding answer table would be. |
#5
| |||
| |||
|
|
I have tried, but get an error regarding db1 in line 2. |
|
I'm now tring with a query instead. But what does "_a" mean ? |
#6
| |||
| |||
|
|
question (AT) Hotmail (DOT) com> wrote: I have tried, but get an error regarding db1 in line 2. OK I will now read your mind to figure out the error you saw. I'm now tring with a query instead. But what does "_a" mean ? The underscore indicates an example element, which is used to join tables in a query. In the query image under those two fields, just press F5 a and move out of the field. The a will actually show up in red to show that they are examples. |
![]() |
| Thread Tools | |
| Display Modes | |
| |