Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL puzzle
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00681325
Message ID:
00681326
Vues:
12
Something like this:

Sele *, cnt(*) as cnt, "1" as flag from Profiles where cString01 $ Profiles.write_up group by write_up ;
UNION all;
Sele *, cnt(*), "2" from Profiles where cString02 $ Profiles.write_up group by write_up ;....


>I think this may qualify as a SQL puzzle.
>
>I have a table with a memo field containing a 2K write-up.
>I have several target strings which may exist in the write-up.
>Using a SELECT statement like the following I can collect a sub-set of records to examine more closely
>
>SELECT * ;
>	FROM Profiles ;
>	INTO TABLE C:\TEMP\Temp ;
>	WHERE Profiles.date_enter > DATE()-60 ;
>		AND NOT EMPTY(Profiles.write_up) AND ;
>		(cString01 $ Profiles.write_up ;
>		OR cString02 $ Profiles.write_up ;
>		OR cString03 $ Profiles.write_up ;
>		OR cString04 $ Profiles.write_up)
>
>
>Puzzle: I want to find out how many target strings exist in each record, so I can take a closer look at those records records.
>
>I suppose I could run a scan loop and counters...but is there another (hopefully better) way?
>
>Rick
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform