I had a requirement to store huge data of xml into AX table i.e. I used string size as [MEMO].
Response1, Response2 & Response3 are Memo Fields.
Now my requirement is to perform to select some data based on where conditions checking Response 1, Response 2 & Response 3 parameters in where clause but it gives me Error
Note: I wanted to check for NULL & NOT NULL
Container and unbounded string fields are not allowed in a WHERE expression.
while select * from appLog
where appLog.ReceiptNo == ""
&& appLog.Response1 != ""
&& appLog.Response2 != ""
&& appLog.Response3 == ""
{ resultSet.addEnd(appLog.Response2);
}
Note: After finding error details I came to know you can not use MEMO fields in where clause and have to use IF condition .
Therefore the query was changed as below.
while select * from appLog
where appLog.ReceiptNo == ""
{
response1 = appLog.Response1;
response2 = appLog.Response2;
response3 = appLog.Response3;
if(response1 != "" && response2 != "" && response3 == "")
{
resultSet.addEnd(appLog.Response2);
}
}
Now query is working but I wanted to achieve the above using where clause.
I know this is not the best i.e. would like to know what could be done to fine tune the query.