This is a strange line (apparently, a creature of copy-paste)
Clipboard.AsText:=qry2.FieldValues['name_subagent']'+#39+'='+#39+'Clipboard.AsText:=qry3.FieldValues['result'];
The idea should be something like this:
Clipboard.AsText := qry2.FieldValues['name_subagent']; Clipboard.AsText := Clipboard.AsText + '#39'; //Я так понял #39 это разделитель в строке Clipboard.AsText := Clipboard.AsText + qry3.FieldValues['result'];
or, in short:
Clipboard.AsText := qry2.FieldValues['name_subagent'] +'#39'+ qry3.FieldValues['result'];
Addition Found on the Internet:
It’s not a problem.
In your case, it seems that the Currency does not convert to a string, that is, you must run over the returned Variant from qry3.FieldValues['result'] and convert the values manually, to a string (at the beginning to the list of strings, which then already the whole string, therefore, to add to the first column, which, it seems, was automatically converted to a row).