Dynamic role condition

Dear Sirs

I try to put the following to the Dynamic role condition for just simple testing, however i have gotten the error 

Person.UID_Person in (select UID_Person from ADSAccount) 

The SQL statement in the field 'Condition' is not correct.

May i know what should i do next and are there any samples i can refer to ?

Thanks
Gary