E
excel_hari
Hi,
This is my introduction to Access and even databases (I have some
basic grounding in SQL through Oracle/SAS).
I generated a SQL query using Wizard and got the following
SELECT ISSM_Table.PIN, ISSM_Table.[ISSD Special], OSRM_Table.[Prod Mfg
SKU Cd]
FROM ISSM_Table INNER JOIN OSRM_Table ON ISSM_Table.PIN =
OSRM_Table.[Prod Mfg SKU Cd];
I wanted to add another condition to my Query and also modify the
columns being selected and store the results in to a new table, for
which I wrote the following query.
SELECT OT.* INTO SpecialSKU
FROM OSRM_Table AS OT INNER JOIN ISSM_Table AS IT ON (OT.[Prod Mfg SKU
Cd] = IT.PIN) and on (IT.[ISSD Special] = "X");
When I try to execte it, I get the error message
Invalid Use of '.', '!', or '()'. in query expression".
Please point out the mistake in the above.
Also, I want to add as to how I generated the 2 tables in my database.
I had 2 excel files which I imported in to Access using File--Get
External Data Import. While choosing the variou options for import :-
a) I chose PIN to be indexed in ISSM_Table while "Prod Mfg SKU Cd" to
be indexed in OSRM_Table. Just to give a background the "Prod Mfg SKU
Cd" would be a subset of PIN.
b) I selected that no primary key should be created for both the
tables. Thats because PIN and Prod Mfg SKU Cd would have duplicate
values.
Once the above was done I went to relationships (I want to define a
foreign ke relationship)and by keeping ISSM table on left hand side, I
dragged PIN to "Prod Mfg SKU Cd" in OSRM table. I got a window called
edit relationships in which I tried to check on Referential Integrity
but get a message saying that "No index found for the referenced field
of the primary table" Why is this happening? Also, If I drag PIN to
"Prod Mfg SKU Cd", then does PIN become the foreign key to "Prod Mfg
SKU Cd" or is it vice-versa?
Regards,
HP
India
This is my introduction to Access and even databases (I have some
basic grounding in SQL through Oracle/SAS).
I generated a SQL query using Wizard and got the following
SELECT ISSM_Table.PIN, ISSM_Table.[ISSD Special], OSRM_Table.[Prod Mfg
SKU Cd]
FROM ISSM_Table INNER JOIN OSRM_Table ON ISSM_Table.PIN =
OSRM_Table.[Prod Mfg SKU Cd];
I wanted to add another condition to my Query and also modify the
columns being selected and store the results in to a new table, for
which I wrote the following query.
SELECT OT.* INTO SpecialSKU
FROM OSRM_Table AS OT INNER JOIN ISSM_Table AS IT ON (OT.[Prod Mfg SKU
Cd] = IT.PIN) and on (IT.[ISSD Special] = "X");
When I try to execte it, I get the error message
Invalid Use of '.', '!', or '()'. in query expression".
Please point out the mistake in the above.
Also, I want to add as to how I generated the 2 tables in my database.
I had 2 excel files which I imported in to Access using File--Get
External Data Import. While choosing the variou options for import :-
a) I chose PIN to be indexed in ISSM_Table while "Prod Mfg SKU Cd" to
be indexed in OSRM_Table. Just to give a background the "Prod Mfg SKU
Cd" would be a subset of PIN.
b) I selected that no primary key should be created for both the
tables. Thats because PIN and Prod Mfg SKU Cd would have duplicate
values.
Once the above was done I went to relationships (I want to define a
foreign ke relationship)and by keeping ISSM table on left hand side, I
dragged PIN to "Prod Mfg SKU Cd" in OSRM table. I got a window called
edit relationships in which I tried to check on Referential Integrity
but get a message saying that "No index found for the referenced field
of the primary table" Why is this happening? Also, If I drag PIN to
"Prod Mfg SKU Cd", then does PIN become the foreign key to "Prod Mfg
SKU Cd" or is it vice-versa?
Regards,
HP
India