0

I want to create a Lookup which have to return two different values of a special Column.

For example:

Column1 Column2 
  01    .....
  02    .....
  03    .....
  02    .....
  04    .....
  01    .....
  02    .....
  03    .....
  02    .....
  04    .....

Now I want to return all rows which include 01 AND 04

Would that be possible?

Currently I solved that problem with to filter

SET @subrow1 = LookupOrderedRows("SubjectsOverview",@subshow, "PubDate desc","Subjects", "01")
SET @subrow2 = LookupOrderedRows("SubjectsOverview",@subshow, "PubDate desc","Subjects", "04")
1

You can send multiple key value pairs to the Lookup functions in AMPscript. You should be able to use a single lookup:

set @rows = LookupOrderedRows("SubjectsOverview",@subshow, "PubDate desc","Column1", "01", "Column2", "04")

set @rowCount = RowCount(@rows)
if @rowCount > 0 then
    /* do things here */
endif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.