Hi guys,
My client has a requirement to add a column of random numbers to the query result.
I wrote a function as below:
Class Utils.SqlUtility Extends %RegisteredObject
{
ClassMethod GetSomeNumber(intInput As %Integer) As %Integer [ SqlName = GetNumber, SqlProc ]
{
Return $R(intInput)
}
}
But in the returned sql result, every row share the same value, as below,
SELECT Utils.GetNumber('456'),
ID, Citizenship, DOB, FirstName, Gender, IDNumber, LastName, PatientNumber, PhoneNumber
FROM CDR.Patient