full name from first and last name, again

G

Guest

I have two tables. One has "customer full name" in one field. The other is
from another database and has two fields, : "first name" and "last name". I
want to retrieve all records that match :customer full name" in one table
with "first and last name" in other table. I don't know how to do it. Or
Better suggestions? Thanks you very much in advance.

P.S> First table's "customer full name" has a comma and one space between
its first and last name. How can I use second table's first and last name to
match second table's "customer full name"
 
S

Shotodru

You could try the following idea:

1. From the second table, select the field which has the "last name" part
of the full customer name.
2. Add a comma and then add one space after that.
3. Add the contents of the field which has the "first name" part of the
full customer name from the second table.
4. All of the above contents should be stored in a String variable which
would be needed to be declared first. So this step has to go to the
beginning of all the steps.

5. Next, you could take the content of the field containing the "customer
full name" in the first table and compare it with the contents of the String
variable which now has the compiled contents of the customer full name in
identical format to that which is stored in the first table.

6. As an added measure, you could also try doing a TRIM on the String
variable and the "customer full name" field of the first table.

The above is just a plain gist as to the processes involved in trying to
exact a retrieval policy involving these two tables. I have not elaborated
on the exact commands which would be needed to actually address your
problem.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top