Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
 
À
14/07/2005 03:55:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Select
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01032514
Message ID:
01032569
Vues:
22
>hi,
>thank you,
>i mean between to dates,myfiled name is dat
>i need to get result or information form mytable table1,between 2 dates (period time) ,
>thanks.
> >>hi all,
>>>could you help me to change this code under to select statment ,
>>>
>>>ldStart=MONTH(thisform.text2.Value)
>>>ldEnd=MONTH(thisform.text25.Value)
>>>m.a=UPPER(ALLTRIM(thisform.text18.value ))
>>>m.f=THISFORM.TEXT24.VALUE
>>>------------------------------
>>>
>>>&&&i useto this code to get result for one month only i try to insert another date to get result ,not works&&&
>>>LOCATE FOR   MONTH(dat)=MONTH(thisform.text2.Value) .and. MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>>>IF FOUND()
>>>set filter to   MONTH(dat)=MONTH(thisform.text2.Value) and MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>>>....
>>>....
>>>else
>>>=messagebox("not found")
>>>...
>>>endif
>>>
>>>
>>>thanks.
>>

Mohammed, try
SELECT * FROM table1;
WHERE BETWEEN(MONTH(table1.dat),MONTH(thisform.text2.Value),MONTH(thisform.text25.Value)) AND table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND table1.TYP=THISFORM.TEXT24.VALUE
INTO CURSOR MyCursor
IF _TALLY > 0
...
...
ELSE
   =messagebox("not found")
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform