I have two data extensions.
Data extension A has a record for each quote created via our website in the last 24 hours. There may be multiple records per email address, if the user has elected to create multiple quotes.
Data extension B is created from data extension A, and captures unique email addresses from the last 24 hours. There is one record per email address.
I would like to send one follow-up email to the user, which includes a table containing information about all of the quotes they created in the last 24 hours. Obviously I cannot just send to data extension A, because that would send them an email for each quote record. My plan to accomplish this was creating data extension B and sending to that data extension. However, I've realized that I don't know how to code the email to reference data extension A while sending to data extension B.
Any advice for how to accomplish this task?
Best Answer
To help anyone else that runs across this issue, I am turning the comments into an answer.
You would use the LookupRows() AMPScript function if you need to grab multiple values returned from a different DE
Sample: (multiple results)
Sample: [single result using LookupOrderedRows()]
Or you would use the Lookup() AMPScript function if you only need a single value returned from a different DE.
Sample
SET @fName = Lookup(DE_A, 'FirstName', 'email_address', emailaddr) /* Will return the First Name only from a single entry*/