>I'm trying to do this sql statement
>SELECT item.ticket, Item.item, item.serialnr, item.cat;
> FROM item;
> where (ltrim(Item.ticket)) = temp;
>
>I need to trim all the blanks out of this character field, but it wont do it in my where statement anyone know of a way to do this?
>
Are you trying to strip out all blanks, all leading blanks, all trailing blanks, all leading or trailing blanks:
WHERE STRTRAN(item.ticket," ",'') = temp && eliminate all blanks
WHERE LTRIM(item.ticket) = temp && eliminate leading blanks
WHERE RTRIM(item.ticket) = temp && eliminate trailing blanks
WHERE ALLTRIM(item.ticket) = temp && eliminate leading and trailing blanks
The WHERE clause does not affect the output of the SQL Select fields; item.ticket will not have its contents changed for output as a result of the function applied in the WHERE.