I got back an exception when trying to use TRIM in a SELECT statement. The error was returned as an "EUNIERROR", with the text "'TRIM' is not a recognized built-in function name."
This was directed to a SQL Server target. Can you suggest how I may correct my code?
Here is the actual example:
q := TUniQuery.Create(nil);
try
q.Name := 'q';
q.Connection := frmDesktop.dbLocal;
q.SQL.text := 'Select Count(*) from ord_paym WHERE Order_no= ''' + Order_no +
''' and pay_ref =''EM'' and TRIM(aba_no) in (' + spromo + ')';
q.open;
if q.FieldByName('count(*)').AsInteger > 0 then
Result := True;
q.Close;
finally
freeandNil(q);
end;