Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Problem

Status
Not open for further replies.

bestbefore99

IS-IT--Management
Jan 24, 2002
16
IT
Hello Experts.

I am trying to write a small Billing Program using Access for demo.
I have 3 tables.
Unrated_CDR,
PRICE,
Rated_CDR

and I am trying to create a Rated_CDR based from the values in the tables Unrated_CDR and PRICE.

The query is the following

UPDATE Rated_CDR, Unrated_CDR, PRICE

SET Rated_CDR.Rated_USD = (

Unrated_CDR.Byte_Tx*PRICE.Byte_Tx
+ Unrated_CDR.Bitrate*PRICE.Bitrate
+ Unrated_CDR.A_to_B_distance*PRICE.A_to_B_distance)
+ (Unrated_CDR.Service_end_date - Unrated_CDR.Service_start_date
)*PRICE.Duration
+ Unrated_CDR.Multicast*PRICE.Multicast;


But unfortunately Access say '0 rows selected'

Any hint?


 
Your code shows no joins between tables, which seems suspicious. Assuming table Price has more than one record, how can the correct price be determined?

Suggest that you first use the query wizard to create a select query incorporating the necessary elements, with a calculated totals field.

Once that is up and running, it's a simple matter to turn it into an update query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top