wvpv
7/30/2017 - 11:40 PM

sfmc-ampscript-lookup-do.html

%%[
var @rows, @row, @rowCount
var @lookupValue
set @lookupValue = "whee"

set @rows = LookupRows("DataExtensionName","LookupColumn", @lookupValue)
set @rowCount = rowcount(@rows)

if @rowCount > 0 then

  var @DEColumn1, @DEColumn2
  set @row = row(@rows,1) /* get row #1 */
  set @DEColumn1 = field(@row,"DEColumn1")
  set @DEColumn2 = field(@row,"DEColumn2")

]%%

  DEColumn1 is %%=v(@DEColumn1)=%%, DEColumn2 is %%=v(@DEColumn2)=%%

%%[ else ]%%

  No rows found

%%[ endif ]%%