473,385 Members | 1,409 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,385 software developers and data experts.

Auto correcting missing data

19
Good evening folks, this forum has been very helpful, but I have one last hurdle I am trying to overcome.

I have two tables with a one to one relationship (T1 and T2). Example data looks like:

Expand|Select|Wrap|Line Numbers
  1. T1:
  2. Field1             Field2 (PK1 to T2)
  3. ----------------------------------
  4. 1111111                   1
  5. 1111111                   2
  6. 1111111                   3
  7. 1111111                   4
  8. 2222222                   5
  9. 2222222                   6
Expand|Select|Wrap|Line Numbers
  1. T2:
  2. Field1        Field2        Field3        Field4 (FK to T1)
  3. -----------------------------------------------------------------
  4. "Some string"    "BA"        1        1
  5. "HUGE STRING"    "BA"        0        2
  6. "striiiiing"                    Null        0        3
  7. Null        Null        1        4
  8. Null        Null        0        5
  9. Null        Null        0        6
What I need to do is copy the contents of Field2, Field3, and Field1 in T2 so that each record from T1.Field1 has the same data in T2. I have 50,000
odd records, so I can't do it manually. Ideally, in the above scenario, the end result would like:

Expand|Select|Wrap|Line Numbers
  1. T2:
  2. Field1        Field2        Field3        Field4 (FK to T1)
  3. -----------------------------------------------------------------
  4. "HUGE STRING"    "BA"        1        1
  5. "HUGE STRING"    "BA"        1        2
  6. "HUGE STRING"    "BA"        1        3
  7. "HUGE STRING"    "BA"        1        4
  8. Null        Null        0        5
  9. Null        Null        0        6
For T1.F1: Take the largest value of T2.Field1 and copy it into all the fields in T2.F1 for the instance of T1.F1. Does this make sense? Probably not :/
Nov 15 '07 #1
0 773

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

Similar topics

5
by: Jesper Jensen | last post by:
Hello group. I have an issue, which has bothered me for a while now: I'm wondering why the column statistics, which SQL Server wants me to create, if I turn off auto-created statistics, are so...
5
by: robin | last post by:
Hi, I've implemented a Style Sheet in Dreamweaver; one of the elements is supposed to stay right with the text flowing around it on the left. A similar tag is supposed to stay left with the...
22
by: Richard | last post by:
Can any one correct these true and false answer for me? I did not but I don't know if they are all corrected. THanks True. In C++, resersed words the same as predefined identifiers. ...
5
by: Phil Latio | last post by:
I have 2 virtually identical tables and wish to move data between them. Basically one table is called "live_table" and the other is named "suspended_table" and the only difference is that the...
2
by: Ehud Banai | last post by:
Hi All, Is there any script or dll that allows me to do auto correction to digital pictures from PHP? Thanks in advance, Ehud
9
by: i | last post by:
#include<stdio.h> #include<conio.h> #include<process.h> #include<string.h> char ch; int n,m; void main(); char check(int,int,char); void cash(int,int,char); void debit_card(int,int,char);
1
by: binky | last post by:
Good afternoon folks, a quick question for all you SQL gurus out there. I'm cleaning up a table from another person at my company and am running into a small problem. Assume: Table: T1...
3
by: jamthoyoung | last post by:
Hi I have noticed a several plugings (jquery mask and the dojo date widget) auto correct user data if it is entered improperly. Or they delete the data when the user tabs out of the input. ...
9
zimes
by: zimes | last post by:
I am working with Microsoft Access 2003 from the Office XP pro suite. I have created several tables that have to do with Asset tracking along with purchasing. I have a table called Purchasing,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.