Validating length of ngrams in varchar field in mySQL -


i have column in table in mysql contains ngrams, , want validate each ngram of correct length.

for e.g. if ngram 'sophisticated hacking scheme' number of blanks should two.

is there in mysql count blanks? or can suggest quick sql fix?

one i've used in sql server, adapted using mysql functions is:

char_length(column) - char_length(replace(column,' ','') 

that - what's length of column, vs length of column if of spaces removed? should give number of spaces present.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -