4

I would like to query the Data extension record - subscriber with phone field contains data and aswell phone field not containing data .

VAR @Rows2,

SET @Rows2 = LOOKUPROWS("dataextensionREcord","subscribe", "true", "Country","US", "Phone", "")
%%=ROWCOUNT(@Rows2) =%%

Result : fail

I tired following :

SET @Rows2 = LOOKUPROWS("dataextensionREcord","subscribe", "true", "Country","US", "Phone", isNull("Phone"))

SET @Rows2 = LOOKUPROWS("dataextensionREcord","subscribe", "true", "Country","US", isNull("Phone"),true)

I don't see anything with NOT-EMPTY or NOT-NULL or any other function to query with for fields which contain/do not contain data. How can this be done ?

  • Can you try "Phone", @null) I'm just checking to see if you pass a null variable across it'll return the data that you want. – Amtera Apr 10 '14 at 11:22
1

Unfortunately, you cannot do what you're looking to do, directly. Don't I WISH! I do have a couple of workarounds for you:

Write a query activity to do your segmenting for you into another data extension. Then, do your look ups based on that new DE.

OR

Create your own definition of "null", and make that the default on that field. So, instead of having "null" on a phone field you would have 999-999-9999 or something. Then when you're looking for null fields, you would look up by 999-999-9999.

Hope this helps.

| improve this answer | |
  • Cool Option. I already tried option one in your answer. Just Wondered after creating query activity , does this new DE will gets updated automatically when there is change in the master DE ?? And Thanks a lot for your valuable Answer. – Jack85 Apr 11 '14 at 10:03
  • No, you'd have to rerun the query. They're essentially different tables at this point that don't know about each other. If you're doing this as part of a "send", then do this query as part of an automation, preceding the send. Please give this answer a vote if you find it useful! – Timothy Apr 11 '14 at 16:29
  • Cool! thanks. Its being used in landing page as a reporting table for the guyz to check regular the number of subscriber and other subsciber counts from the DE.As its being used for daily reporting purpose, how could its being made automatic ..so Query activity is run every day...refresh the data and so the reporting landing page shows latest data every day??..thx – Jack85 Apr 15 '14 at 6:43
  • 1
    You could put it in a program inside email and schedule it or use the "new and improved" way by scheduling it in Automation Studio (recommended). See the Automation Studio documentation here: help.exacttarget.com/en/documentation/automation_studio/… – Timothy Apr 15 '14 at 12:35
  • I tried to schedule automatation for filter activity in Automation Studio but cannot and gives me the error "Automation Saved, With Problems. "AUTOMATION_TEST 20140429" saved but not scheduled. Specified schedule was invalid." – Jack85 Apr 29 '14 at 10:43

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.