Home > database >  For help: how to find the two tables in the same field of record?
For help: how to find the two tables in the same field of record?

Time:05-16

The great god, help! Looking for the same data in the two tables - name!
Two forms, one is the student table, one is a table showing the graduates
Students table has already graduated, graduates will be reflected in the table

Now I need to find all the students in graduate total table of the same name in the table of student

Now I made a form



The local a, b, I, num
1
seleB=thisform. Text1. Value
Use & amp; B alias bb


Sele 2
A=thisform. Text2. Value
Use & amp; A alias aa


I=0
J=0
Sele 2
The do while. Not. Eof ()
Ly=xm
1
seleLocate the for xm=ly
If found ()
Repl bb. The serial number with ALLTRIM (bb) serial number) + ALLTRIM (aa) serial number)
I=I + 1
The else
Sele 2
Repl marked with 'no'

J=j + 1
Endif
Sele 2
The skip
Enddo
1
seleUse the
Sele 2
Use the
? I
But this can only check the total table not wish student
Such as total graduates have a lot of like wang qiang namesake, records in the table, the can't find all wang qiang
This cycle can only find the first wang qiang
The great god can help me modify the
Thank you very much!

CodePudding user response:

Graduates always watch is always
Students watch is to be found in total table name watch

I want to put the students in the student's name in graduates find full of the total in the table, can do a tag
Hence the students watch out a serial number, as long as the total table found in graduates and students in the table with the same name in the table number replace the serial number in the table always
If there are no students in a total table in the table name in the student make a mark in the table

CodePudding user response:

I want to put the students in the student's name in graduates find full of the total in the table, can do a tag
Hence the students watch out a serial number, as long as the total table found in graduates and students in the table with the same name in the table number replace the serial number in the table always
If there are no students in a total table in the table name in the student make a mark in the table

CodePudding user response:

With the CONTINUE command

CodePudding user response:

Thank you very much!
No, where did you add?
This form is to help others to do, I'm completely don't understand the wow
Can help help me to change it? Add in where?

CodePudding user response:

reference 5 floor brother dugu's reply:
and CONTINUE command

My own adjusting, can use, thank you very much!

But there is a problem, that is to name, if I will compare the date of birth, as if to show is the same person
So how to change my command in the form

CodePudding user response:

refer to 7th floor yilanceeee response:
Quote: refer to fifth floor brother dugu response:
add CONTINUE command

My own adjusting, can use, thank you very much!

But there is a problem, that is to name, if I will compare the date of birth, as if to show is the same person
So how to change my command in the form

Use after the check, or not, there are some errors occur, cannot than out completely
  •  Tags:  
  • VFP
  • Related