On 19-03-2014 15:51, Roberto Spadim wrote:
hi guys, i'm not finding a function to return how many character i have,
for example:
"banana"
i want a function that return 2 "n" characters, example:
substr_count("banana","n") => 2
SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field, 'n', ''))
Many moons ago, I blogged about something similar, performance
considerations and how to make your own function:
http://www.bitbybit.dk/carsten/blog/?p=55
Best,
/ Carsten
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp