A
Alain
Hi,
Access 2002, Win2K Pro, French
I have a IdTelephone table with following fields:
Id: Autonumber, unike Key, unused here
idMembre: Member Id, long integer
IdType: type of phone number, integer: 1 = home phone, 2 = Work phone
Telephone: phone number, text
....
I want to merge each member's data in a query where home phone number
will be identified as TelephoneDom and work phone number will be named
TelephoneTr. Each person has either Home OR Work OR both.
Here is my inner join query:
SELECT Distinct Princ.IdMembre,
(Select Dom.Telephone FROM IdTelephone AS Dom WHERE (Princ.IdMembre =
Dom.IdMembre) AND (Dom.IdType = 1)) as TelephoneDom,
(Select Tr.Telephone FROM IdTelephone AS Tr WHERE (Princ.IdMembre =
Tr.Idmembre ) AND (Tr.IdType = 2)) as TelephoneTr
FROM IdTelephone AS Princ;
Same query generates correct data for similar tables (same fields, same
type of data, same indexes) about Mail addresses and eMail addresses.
On the Telephone table, this query generates:
* a «this subquery can return at most one record» message
OR
*correct result is displayed for a short time
above message is displayed
and all fields in query are then filled with #Name? Help says its an
#3354 error.
Why? How can I avoid this problem?
Thanks
Alain
Access 2002, Win2K Pro, French
I have a IdTelephone table with following fields:
Id: Autonumber, unike Key, unused here
idMembre: Member Id, long integer
IdType: type of phone number, integer: 1 = home phone, 2 = Work phone
Telephone: phone number, text
....
I want to merge each member's data in a query where home phone number
will be identified as TelephoneDom and work phone number will be named
TelephoneTr. Each person has either Home OR Work OR both.
Here is my inner join query:
SELECT Distinct Princ.IdMembre,
(Select Dom.Telephone FROM IdTelephone AS Dom WHERE (Princ.IdMembre =
Dom.IdMembre) AND (Dom.IdType = 1)) as TelephoneDom,
(Select Tr.Telephone FROM IdTelephone AS Tr WHERE (Princ.IdMembre =
Tr.Idmembre ) AND (Tr.IdType = 2)) as TelephoneTr
FROM IdTelephone AS Princ;
Same query generates correct data for similar tables (same fields, same
type of data, same indexes) about Mail addresses and eMail addresses.
On the Telephone table, this query generates:
* a «this subquery can return at most one record» message
OR
*correct result is displayed for a short time
above message is displayed
and all fields in query are then filled with #Name? Help says its an
#3354 error.
Why? How can I avoid this problem?
Thanks
Alain