If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
How To Find Fields Containing One String Character?
Hey guys,
I am creating a query that will return all member names where their first name contains a single character.
I can't find any db2 functions that will work for me. I can accomplish this in SQL with "where DATA_LENGTH(FNAME) = 1", but I can't find a DB2 equivalent to this function.
The string functions don't seem to work because they would be looking for specific values. Can anyone help?
At least up to the SQL standard 2003, DATA_LENGTH is not a standardized function. So for more portable code, you shouldn't rely on it in other database systems either.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development