[SalesForce] Exacttarget data extension – How to retrieve all rows in AMPScript

I have a landing page that needs to display a list of all the records in a data extension in real time. In the past we have done this with a subset of the data using the LookupRows function. This works great, but from what I can see it only returns a subset not the entire data extension.

Is there a way in ampscript to return all the rows from a Data Extension?

Best Answer

The only way I know of to do this is to create a field in the data extension that has a default value, since this value will be the same for every record you use this field/value pair as your lookup criteria.

So for example add a field called "return", with a default value of "1". Then use this code:

LookupRows("YOUR DE NAME","return","1")

This isn't recommended for large data sets.

Related Topic