×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Join two tables to pull specific field into the report

Join two tables to pull specific field into the report

Join two tables to pull specific field into the report

(OP)
I need to be able to join "Table_1.TRIPID" and "Table_1.SEQUENCE' to "Table_2.TRIPID" and "Table_2.SEQUENCE'
to pull "Table_1.schHwy"

Table_1

"schHwy","TRIPID","SEQUENCE"
0,"1834556",24
0,"1834556",3
0,"1834556",4
0,"1834556",5
0,"1834556",6
0,"1834556",7
0,"1834556",8
0,"1834556",9
0,"1834847",1
0,"1834847",10
0,"1834847",11
0,"1834847",12
0,"1834847",13
0,"1834847",14

Table_2

"SEQUENCE","TRIPID"
1,"1743206"
1,"1743207"
1,"1743208"
1,"1743228"
1,"1743229"
1,"1743230"
1,"1743232"
1,"1743220"
1,"1743233"
1,"1743234"
1,"1743235"
1,"1743211"
1,"1743210"
1,"1743212"
1,"1743248"
1,"1743213"
1,"1743215"
1,"1743214"
1,"1743219"
1,"1743268"
1,"1743269"
1,"1743216"
1,"1743270"
1,"1743271"
1,"1743272"
1,"1743273"
1,"1743221"
1,"1743222"
1,"1743223"
1,"1743224"
1,"1743226"
1,"1743227"
1,"1743198"
1,"1743236"
1,"1743237"
1,"1743238"
1,"1743239"
1,"1743240"
1,"1743241"
1,"1743242"
1,"1743243"
1,"1743244"
1,"1743245"
1,"1743246"
1,"1743247"
1,"1743250"
1,"1743251"
1,"1743252"
1,"1743253"
1,"1743254"
1,"1743255"
1,"1743256"
1,"1743257"
1,"1743258"
1,"1743217"
1,"1743259"
1,"1743188"
1,"1743218"
1,"1743189"
1,"1743190"
1,"1743209"
1,"1743191"
1,"1743192"
1,"1743193"
1,"1743194"
1,"1743195"
1,"1743196"
1,"1743197"
1,"1743200"
1,"1743201"
1,"1743202"
1,"1743203"
1,"1743204"
1,"1743205"
1,"1743249"
1,"1743199"
2,"1743206"
2,"1743207"
2,"1743208"
2,"1743228"
2,"1743229"
2,"1743230"
2,"1743231"
2,"1743232"
2,"1743220"
2,"1743233"
2,"1743234"
2,"1743235"
2,"1743211"
2,"1743210"
2,"1743212"
2,"1743248"

RE: Join two tables to pull specific field into the report

Whats your question
Add both tables to report and in Linking expert drag click in Sequence in Table 1 and drag to Sequence Table2
Repeat for ID. This creates a SQL join.
If you require another type of join right click join line and select join type you want.

Ian

RE: Join two tables to pull specific field into the report

(OP)
Thanks Ian! The problem I'm having is that "SEQUENCE" and "TRIPID" are not unique fields in either table.
Is it possible to still join the two tables and get the correct "schHwy"?

RE: Join two tables to pull specific field into the report

(OP)
Table_1 and Table_2 have several other fields that are the same in each table, but I have no fields in both table that are the same and also primary or unique fields.
Is it possible to join tables that have no unique fields?

RE: Join two tables to pull specific field into the report

What happens if you join the two tables on both fields? Trip ID and sequence?

-LB

RE: Join two tables to pull specific field into the report

I don't know your data.
Do Joins as suggested and see what values for schHwy are returned.

If you get multiple results for same schHwy value then you will probably need to add a filter on one or several other fields.
You can add the filter in the select expert

Ian

RE: Join two tables to pull specific field into the report

(OP)
Thanks, I will do joins as suggested and see what values for schHwy are returned.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close