HELP: URGENT: MULTI-TABLE Query (SQL7)

HELP: URGENT: MULTI-TABLE Query (SQL7)

Post by Ayaz As » Wed, 07 Jun 2000 04:00:00



Hello,

I'm using SQL SERVER 7.0. I'm very new to Multi-Table querying, and
can't seem to figure this one out. Any help would be appreciated.

I have 2 tables. one is called RATES and one is called BILLING

In the BILLING table, there are 2 columns, one is COUNTRY and
the other is ACTUAL.  In the RATES table, there are two columns
COUNTRY (which you would use to match the rate to) and RATE.

This is for an ASP page. It has to go row by row of the BILLING
table and calculate the total of a phone call, by multiplying the
ACTUAL of BILLING column with the RATE for that COUNTRY.
It sounds simple, but I get strange (wrong) results everytime.

Any help would be appreciated.  Thanks in advance.

Ayaz Asif

 
 
 

HELP: URGENT: MULTI-TABLE Query (SQL7)

Post by Bob Pfeif » Wed, 07 Jun 2000 04:00:00


What does your query look like now?  I would expect something like this
would produce the results you want:

select
    b.country,
    b.actual * r.rate as charge
from
    billing as b, rate as r
where
    b.country = r.country

 
 
 

1. HELP PLEASE: URGENT: Need help forming a multi table query

Hello,

I'm using SQL SERVER 7.0. I'm very new to Multi-Table querying, and
can't seem to figure this one out. Any help would be appreciated.

I have 2 tables. one is called RATES and one is called BILLING

In the BILLING table, there are 2 columns, one is COUNTRY and
the other is ACTUAL.  In the RATES table, there are two columns
COUNTRY (which you would use to match the rate to) and RATE.

This is for an ASP page. It has to go row by row of the BILLING
table and calculate the total of a phone call, by multiplying the
ACTUAL of BILLING column with the RATE for that COUNTRY.
It sounds simple, but I get strange (wrong) results everytime.

Any help would be appreciated.  Thanks in advance.

Ayaz Asif

2. SYBASE Performance

3. URGENT help please - need to limit results with multi table join

4. NJ-TECHNICAL CONSULTANTS

5. Help please with multi-table query

6. Row retrieval failed

7. Need help trying to set up Query across multi tables

8. MAPI Interface with Groupwise

9. help with multi-table query

10. Help Multi table Query