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

Link Tables

Status
Not open for further replies.

crguy

Programmer
May 24, 2001
34
CA
Hi I am trying to link 2 tables from 2 different datasources. It would be easy if there was a common indexed field but there isn't. I need to link the tables by
table 1: person_id (9 digits)
table 2: person_num (7 digits)

The person_id is '15'||person.num to make it 9 digits.

How can I link these 2 tables? HELP
 
I tired that, and it didn't seem to work. Can you elaborate
 
You can use a formula field (grabbing only the useful 7 digits from table 1) and passing it as the link argument
to the filter in the subreport, which retrieves the data from table 2.

hth,
- Ido
 
Is there a way to add the "15" instead of trimming the 9 digit? If so can you provide me the right syntax. I can't seem to get the right syntax.

Thanks
 
Since table 2 has a 7 digit code, you should probably remove the 15 from the field in table 1.

If person_id is a number, just substract 150000000
from it. If it's a string, then use something like:
Right ({person_id}, 7)

Cheers,
- Ido

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top