dbTalk Databases Forums  

Paradox 5 (Win)

comp.databases.paradox comp.databases.paradox


Discuss Paradox 5 (Win) in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hotmail.com
 
Posts: n/a

Default Paradox 5 (Win) - 03-20-2007 , 07:54 AM






Hi,

Is there anyone who can help me making a simple SUM

DB1
----
BarCode
Count

DB2
----
BarCode
Text
Price
....


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).

When I try some records are calculated correctly others not.

Query Test1
DB1
-----
Barcode V
Count calc sum all as Total numer

DB2
-----
Barcode
Text V
Price V


Reply With Quote
  #2  
Old   
Larry DiGiovanni
 
Posts: n/a

Default Re: Paradox 5 (Win) - 03-20-2007 , 08:37 AM






<Hotmail.com> wrote:

Quote:
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 |
Quote:
_a | CALC SUM |
DB2 | Barcode | Text | Price |
Quote:
_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.

--
Larry DiGiovanni




Reply With Quote
  #3  
Old   
Hotmail.com
 
Posts: n/a

Default Re: Paradox 5 (Win) - 03-20-2007 , 08:50 AM



Thankz. I'll try it out

On Tue, 20 Mar 2007 10:37:09 -0400, "Larry DiGiovanni"
<nospam (AT) nospam (DOT) com> wrote:

Quote:
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.

Reply With Quote
  #4  
Old   
question@Hotmail.com
 
Posts: n/a

Default Re: Paradox 5 (Win) - 03-20-2007 , 09:31 AM



Hi again,
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 ?

TIA

MJ

On Tue, 20 Mar 2007 10:37:09 -0400, "Larry DiGiovanni"
<nospam (AT) nospam (DOT) com> wrote:

Quote:
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.

Reply With Quote
  #5  
Old   
Larry DiGiovanni
 
Posts: n/a

Default Re: Paradox 5 (Win) - 03-20-2007 , 10:28 AM



<question (AT) Hotmail (DOT) com> wrote:

Quote:
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.

Quote:
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.

--
Larry DiGiovanni




Reply With Quote
  #6  
Old   
question@Hotmail.com
 
Posts: n/a

Default Re: Paradox 5 (Win) - 03-22-2007 , 06:22 AM



:-) It just says that there is an error in line 2 (DB1).

I'll try with the F5

Thanks again.

MJ

On Tue, 20 Mar 2007 12:28:50 -0400, "Larry DiGiovanni"
<nospam (AT) nospam (DOT) com> wrote:

Quote:
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.