TIP: How to use ampersand in an AML, WHERE statement

オフライン

Hi Team,

I am compiling an AML dynamically to query data in our Aras. The challenge is that some people have been creating documents with the "&", ampersand character in the document names.

Doing a "WHERE" in the AML is a challenge, because one needs to escape the "&", but for XML or SQL Server?

The script is:

<AML><Item type='Document' action='get' where="[Document].item_number='AS-D&C-100'" ></Item></AML>

The solution was to replace "&" with "&amp;"

<AML><Item type='Document' action='get' where="[Document].item_number='AS-D&amp;C-1-001-000'" Select='name,state' ></Item></AML>

Parents Reply Children
No Data