473,405 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

perfomring an update on one field in multiple tables.

I have to correct the ID field in 19 tables and there are 265 records affected in just one table . The id field is populated on the values from EInfo.ID, and EInfo.ID is based on the values from EInfo.Clock. Somebody entered the wrong ids in the clock field and and it got poulated with the wrong info, so I have to undo the change.

EInfo.Clock is read from the other filed in the same table callled EInfo.SSN

This is how the IDs should look like.
EInfo.SSN = 123-45-6789
EInfo.Clock = 6789, EInfo.ID = bb6789, where bb = blank space

Once I figure out how to do take care of this then i will change the IDs in other tables.

This is how I can do this.

Read the EInfo.SSN field in a temp variable and then copy the last 4digits and put 2 blank spaces and copy that filed in another variable. I am sure there is a string function for that. and then write that variable into the table.


Once I figure the above part then I need to update the values in other tables.

Then I will take one table e.g; EPayHist, compare the EPayhist.ID from the old values in EInfo.ID and then replace it with EInfo.clock.


My limitations are that I am not very clear in ADO.NET. I have read lots of articles so far. All I know that I would need Data set, command object and data reader class.

But I need some more help than that.

I am not asking to solve my problem but if you can give me a sample code on hw to perform upate query that is similar to what i need, that will be much appreciated. I will be using VB EXPRESS and ACCESS 97 to accomplish this.

Thanks.

I
Sep 19 '06 #1
1 1750
PEB
1,418 Expert 1GB
Hi,

The string functions that you can use are:

Mid(String,Start position, End position) returns String from the start and end posiion of respective string

Left(String, positions) Returns positions forom Left
Right(String, positions) Returns positions from the right!

:)
Sep 19 '06 #2

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

Similar topics

3
by: Epetruk | last post by:
Hi, I have a mySql question here on updates to multiple tables. Here's a simple schema to clarify things: Structure Table A
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
3
by: jpr | last post by:
Hello, I know that this is not the rule but need some help. My datbase has three tables: MASTER TEMPLATES FORMS I have a form which is based on a table named MASTER. I have a primary key...
1
by: jayz24 | last post by:
Hi everyone! I'm new in this forums and new in the line of programming..A Beginner.. I have a problem, I don't know how to populate a multiple updates. Anyone who have codes for this? Here's...
2
by: Swinky | last post by:
I hope someone can help...I feel like I'm walking in the dark without a flashlight (I'm NOT a programmer but have been called to task to do some work in Access that is above my head). I have...
5
by: rdemyan via AccessMonster.com | last post by:
I have a need to add another field to all of my tables (over 150). Not data, but an actual field. Can I code this somehow. So the code presumabley would loop through all the tables, open each...
1
by: racquetballer | last post by:
I need to to an update query that involves three tables: table Dealer needs to be updated with data from table Personnel and table Title. Dealer is joined to Personnel where Dealer.Dealer_Code =...
0
by: oh4real | last post by:
I recently developed a compact function to efficiently allow users to change info in a form (like account info, contact info, etc.) and then the function automatically identifies what's changed and...
5
by: Proaccesspro | last post by:
I have an Access database that contains multiple tables. How can I update a field in all of the tables with a search and replace funtion? In other words, one of the forms has a button that will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.