Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete Month
Message
De
21/08/2007 08:28:06
 
 
À
21/08/2007 08:02:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01249317
Message ID:
01249322
Vues:
19
>Dear Experts
>
>Table1 has only one field as
>
>month c(7)
>
>and data in table is as
>
>06-2007
>06-2007
>07-2006
>07-2007
>07-2007
>08-2007
>07-2007
>
>Now I want to delete all enteries containing 07-2007
>For this, I use this command but it does not work
>
>curmon=07-2007
>lnMonths3 = Val(Substr(curmon , At("-", curmon )+1)) * 12 + Val(curmon ) - 1
>CVAR3 = Str(Int(lnMonths3 / 12), 4)+Padl(Int(lnMonths3) % 12 + 1, 2, "0")
>Select Table1
>delete for month=m.cvar3
>pack
>
>In 07-2007, 07 is month and 2007 is year
>I use British date
>
>Please help

Seems very complicated for the job needed.

curmon = "07-2007"
lcMonth = LEFT( curmon, 2)
Select Table1
Delete for LEFT( Month, 2) = lcMonth
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform