Senin, 23 Mei 2011

[MS_AccessPros] Conditions in Browne's ConcatRelated

 

Is there a way to check for last names being the same as a condition for ConcatRelated? I would like to add a condition saying that if the last names are the same then the names would be joined.

Is this possible?

Thanks!
Connie

Currently, with your help John, I have the following query:

SELECT ListingContacts.ListID, ConcatRelated("[FirstName]","qContactsSellerandSellerSpLN1","ListID = " & [ListingContacts].[ListID],""," & ") AS Sellers
FROM ListingContacts;

SQL for qContactsSellerandSellerSpLN1:
SELECT ListingContacts.ListID, Contacts.FirstName, Contacts.LastName, ListingContacts.SellerTypeID, ListingContacts.Priority, IIf([SellerTypeID] Mod 2=1,[SellerTypeID],([SellerTypeID]-1)) AS JoinNbr
FROM Contacts INNER JOIN ListingContacts ON Contacts.ContactID = ListingContacts.ContactID
WHERE (((ListingContacts.SellerTypeID)<=8) AND ((ListingContacts.Priority)<=4));


__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar