Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Counting Strings in a Field
Message
 
 
À
03/03/2009 13:21:08
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01385278
Message ID:
01385285
Vues:
67
>I have a table with a field that contains one or more strings separtated by commas. I need a SPT that can count the number of strings. The table is a db2 file.

The following expression will return the number of items in the comma separated list (# of commas + 1) in MS SQL Server. I dunno if DB2 has compatible string functions
LEN(myfield) - LEN(REPLACE(myfield, ',', '')) + 1
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform