By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,949 Members | 2,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,949 IT Pros & Developers. It's quick & easy.

Update table with new data in a table and no change old data

P: 36
Hola Gente Hello Great People

I am a beginner here so my excuses.

I need to know how to process update data and no change old data. My update query is with formula for calculate rates if I storage 0.06 in the old record then I proceed to update to 0.08 and my old data 0.06 change I no need this. I need my old data 0.06 and my new data 0.08.

Excuses for my english....

Gracias Thanks! Anyone
Jul 27 '07 #1
Share this Question
Share on Google+
3 Replies


nico5038
Expert 2.5K+
P: 3,072
Hola Gente Hello Great People

I am a beginner here so my excuses.

I need to know how to process update data and no change old data. My update query is with formula for calculate rates if I storage 0.06 in the old record then I proceed to update to 0.08 and my old data 0.06 change I no need this. I need my old data 0.06 and my new data 0.08.

Excuses for my english....

Gracias Thanks! Anyone
Hmm, normlly we don't do this with an Update query.
We just use a SELECT query and apply the calculation on the "basic" fields.
When you have different rates, you'll need something for the distinction. In general an OrderDate field or something similar is used to make this distinction.

The "normalized" way would be to have a tblRate with a StartDate and the value for the Rate. In a query you can use than the datefield to select the appropriate rate.

Nic;o)
Jul 27 '07 #2

P: 36
Hmm, normlly we don't do this with an Update query.
We just use a SELECT query and apply the calculation on the "basic" fields.
When you have different rates, you'll need something for the distinction. In general an OrderDate field or something similar is used to make this distinction.

The "normalized" way would be to have a tblRate with a StartDate and the value for the Rate. In a query you can use than the datefield to select the appropriate rate.

Nic;o)

Hola Nico, Hi Nico

Gracias, Thanks for your answer. Rigth now this is my dificult part. I have a tblExpressionNum in this table I have a field Rates for ID with this table.

but the user modified rates or create new Rates. I need to establish the relationship for this Rates to the selected records by user in combo box from the tblBranches I Include an example if you have any e-mail I send the view. My relationship is one-many if the user select the record in combo box how the establish the correct relationship for rates. Example i only have 2 row for rates with one field for dates if the user determine update in rates my old data change.

I need to know how establish a correct relationship if the user select a correct branch and the rate aplicable for this branch the old data dont update if the user update any rate.

Gracias de nuevo.
Jul 28 '07 #3

nico5038
Expert 2.5K+
P: 3,072
Hola Nico, Hi Nico

Gracias, Thanks for your answer. Rigth now this is my dificult part. I have a tblExpressionNum in this table I have a field Rates for ID with this table.

but the user modified rates or create new Rates. I need to establish the relationship for this Rates to the selected records by user in combo box from the tblBranches I Include an example if you have any e-mail I send the view. My relationship is one-many if the user select the record in combo box how the establish the correct relationship for rates. Example i only have 2 row for rates with one field for dates if the user determine update in rates my old data change.

I need to know how establish a correct relationship if the user select a correct branch and the rate aplicable for this branch the old data dont update if the user update any rate.

Gracias de nuevo.

Looks like your Branch determines the Rate to be used.
So record the RateID in the Branch table and when needed extract the Rate via the Branch table.
Finally use a StartDate (and when you want easy queries also an Enddate) in the Rate table to be able to determine the actual Rate used when recording a record with a Branch. You'll just need to add a "WHERE OrderDate between StartDate and EndDate" to extract the proper Rate at the date then data has been recorded.

You might find http://www.thescripts.com/forum/thread585228.html helpfull to understand the Normalization of tables better.

Nic;o)
Jul 28 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.