Primary Key between two tables

A

Allison

I have an existing Access Database & a Oracle 8 database
table.
I'm trying to reconcile the two sets of data in each
database. I assume in order to establish a relationship a
primary key must be selected??? I would like the full
grant number to be the primary key. The problem that have
is that the Grant Number in one system is not the same as
the Grant Number in the other system. For instance the
Grant Number in the Oracle 8 database looks something like
this: 5-R01-AI-43315-2 5921 in the other Access database
the grant number is the serial number: 43315. I would
like to develop the primary key as the above long grant
number. Is this possible? Also I wanted to note that I
linked the two tables by grant number and I received an
error message: "Type mismatch in expression." Please
Help!!!!
 
J

John Vinson

I have an existing Access Database & a Oracle 8 database
table.
I'm trying to reconcile the two sets of data in each
database. I assume in order to establish a relationship a
primary key must be selected??? I would like the full
grant number to be the primary key. The problem that have
is that the Grant Number in one system is not the same as
the Grant Number in the other system. For instance the
Grant Number in the Oracle 8 database looks something like
this: 5-R01-AI-43315-2 5921 in the other Access database
the grant number is the serial number: 43315. I would
like to develop the primary key as the above long grant
number. Is this possible? Also I wanted to note that I
linked the two tables by grant number and I received an
error message: "Type mismatch in expression." Please
Help!!!!

You can construct the long string in a Query by concatenating its
components. If it's essential to get a link, you could add a Text
field and run an Update query filling it (redundantly) with the
concatenated values. It needn't be the Primary Key in order to
establish a relationship, but it should have a unique Index.

I'm assuming that the bits "R01" and "AI" and "5921" are available
from other fields in your table or can be treated as constant
boilerplate... if not, you may not have the necessary information to
create a link!
 
G

Guest

NEXT QUESTION:

I HAVE THE FOLLOWING FIELDS WITHIN BOTH DATABASES:

TYPE
ACTIVITY CODE
GRANT SERIAL NUMBER
AI
CAN-COMMON ACCOUNT NUMBER

I'VE ESTABLISHED A QUERY CALLED QUERY#1:SELECT I'VE
ENTERED THE ABOVE FIELD NAMES FROM MY TABLE CALLED NONCOM1
EXPLAIN HOW TO CONCATENATE THE FIELDS WITHIN THE QUERY?
 
J

John Vinson

NEXT QUESTION:

I HAVE THE FOLLOWING FIELDS WITHIN BOTH DATABASES:

TYPE
ACTIVITY CODE
GRANT SERIAL NUMBER
AI
CAN-COMMON ACCOUNT NUMBER

I'VE ESTABLISHED A QUERY CALLED QUERY#1:SELECT I'VE
ENTERED THE ABOVE FIELD NAMES FROM MY TABLE CALLED NONCOM1
EXPLAIN HOW TO CONCATENATE THE FIELDS WITHIN THE QUERY?

Please check your caps-lock. All caps is HARD TO READ and looks like
you're SHOUTING AT US.

You can create a calculated field using the & concatenation operator.
I have no idea which field is which, but it might be something like

NewFieldName: [Type] & "-" & [Activity Code] & "-" & [Grant Serial
Number] & "-" & [AI] & " " & [CAN-COMMON ACCOUNT NUMBER]
 
A

Allison

Sorry!!! I'm not shouting I'm confused????

-----Original Message-----
NEXT QUESTION:

I HAVE THE FOLLOWING FIELDS WITHIN BOTH DATABASES:

TYPE
ACTIVITY CODE
GRANT SERIAL NUMBER
AI
CAN-COMMON ACCOUNT NUMBER

I'VE ESTABLISHED A QUERY CALLED QUERY#1:SELECT I'VE
ENTERED THE ABOVE FIELD NAMES FROM MY TABLE CALLED NONCOM1
EXPLAIN HOW TO CONCATENATE THE FIELDS WITHIN THE QUERY?

Please check your caps-lock. All caps is HARD TO READ and looks like
you're SHOUTING AT US.

You can create a calculated field using the & concatenation operator.
I have no idea which field is which, but it might be something like

NewFieldName: [Type] & "-" & [Activity Code] & "-" & [Grant Serial
Number] & "-" & [AI] & " " & [CAN-COMMON ACCOUNT NUMBER]



.
 
J

John Vinson

Sorry!!! I'm not shouting I'm confused????

Did the concatenation expression work? If not, could you explain what
you tried and what worked (or didn't work)?
 

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