wish to delete everything after the first comma for each record
Ah, but that's not what StringTrimEnd does. To refresh: Given a string and a trim string, removes all occurrences, including repeated occurrences, of the trim string at the endof the string and returns the trimmed string. Often used with a trim string of just one character, a ' ' space character, to trim extra spaces from the end of a string. Often used to trim other text as well.
Using a single comma as a trim string will trim that comma only if it is the last character in the string to be trimmed (the "target" string). If there is an invisible space character at the end of the target string, nothing will be trimmed, and likewise if one or more commas appear anywhere in the target string other than the very end. An example, using ',' as the trim string: 
You can accomplish what you want by replacing a regular expression that picks out everything after the first comma with an empty replacement. See this topic or, reducing to what's left as in this topic. Attachments:
stringtrim.png
|