0

Now, I'm working on Java Fuel-SDK and I need to use "and" on select method. I look on example code of Fuel-SDK, I found ET deprecated ETFilter and put "SQL like" syntax on method, Example.

@Test
public void _50_TestSelectFilteredAndStatic()
    throws ETSdkException
{
    ETResponse<ETDataExtensionRow> response = ETDataExtension.select(client,
                                                                     "key=test1",
                                                                     "LastName=Flintstone and FirstName = 'Wilma'");
    testSelectFilteredAnd(response);
}

But, when I tried on my code. It dose not work, no data return. *below is my code.

val response = dbUnsubscribe.select(s"$eventFrom <= EventDate and EventDate <= $eventTo", "order by EventDate")

*Scala code.

2
  • even it is Scala, you would use && not and
    – Ashwani
    Jan 7 '16 at 7:43
  • && is not work, but I found already. Thx guy
    – Peerapat A
    Jan 8 '16 at 8:20
0

I add ['..'] in SQL and it's work.

val response = dbUnsubscribe.select(s"EventDate >= '$eventFrom' and EventDate <= '$eventTo'", "order by EventDate")
2
  • In the interest of helping others can you put a brief explanation why that solved it and mark your answer correct?
    – drakored
    Jan 8 '16 at 8:36
  • I have no idea how to explain. Example of ET is "LastName=Flintstone and FirstName = 'Wilma'" but I use something like this "LastName='Flintstone' and FirstName = 'Wilma'"
    – Peerapat A
    Jan 13 '16 at 2:58

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.