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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace fields question?

Status
Not open for further replies.
Oct 21, 2006
20
US
I have the same dex_id in both tables and they both have the same .dbc, are from the same container.

What I did was make a form and put them in the dataenvironment. Now I connect the with a join on the two dex_ids. When I run the form I see record 64544 and on the other schools7 I see the same 64544.

I go to the command window and put:

REPLACE NEXT 12500 c:\schools\data\dex.gender4 WITH c:\schools7\data\grades.gender3

I want to replace the entire field in dex.gender4 with the grades.gender3. I must have to load the two tables somehow or other into the form since I get a message that gender3 is not to be found.

Where am I wrong? any helper got a better way to replace just one field in 39000 records.

Charlesmac

wnscc@wnscc.org
 
dEAR myearwood,

iT WORKED GREAT BUT THEY ARE ALL F AND NOT M FOR A MAN.

i PUT IN:SELECT dex
replace all gender4 with grades.gender3

BUT IT DID NOT COPY CORRECTLY WHAT WAS IN GRADES.GENDER3.

JOHN
 
Hi Charles, then there is no relation bewteen dex and grades set, so REPLACE always used grades.gender3 from whatere record it sat on.

Make it pure SQL:
Code:
Update dex Set gender4 = grades.gender3 From grades Where grades.dex_id = dex.dex_id
Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top