CountFields in SQL

Ivan Smahin ivan_smahin at paradigmasoft.com
Sat Feb 28 06:37:04 CST 2009


Hello Beatrix,

Saturday, February 28, 2009, 2:27:48 PM, you wrote:

> Either I'm blind or having a senior moment, but I can't seem to
> find the equivalent of CountFields in SQL. Does it exist? If yes, what is the name?

> CountFields:

> Returns the number of values (fields) in the string passed that are
> separated by the separator string passed. If the source string is
> binary data or you require case-sensitivity, use CountFieldsB instead.

> The example below returns 5.
> Dim count as Integer
> Dim s as String
> s="Dan*Smith*11/22/69*5125554323*Male"
> count=CountFields(s, "*")


See
http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:reference:expr:functions:string
for List_NthItem()

and
http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:reference:expr:functions:numeric
for List_ItemCount ()




-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list