Query returning "?" instead of values
I am back with another crazy question. I have a script with a Set Variable statement as follows:
Set Variable[$CertYr; Value:GetAsText ( Let ( [$query = "Select Min(Consultant_certification_achieved) from PeopleRole where Person_Id = ?"; $result = ExecuteSQL($query;"";"";$PersonID)] ; $result))]
But instead of returning a blank or a year it returns "?" I know that Consultant_certification_achieved is an attribute in People Role. I have tried this both unqualified (as above) and qualified (PeopleRole::Consultant_certification_achieved). Both result in "?".
Can someone out there see what I am not seeing and why I am getting this result?