Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert codes in sql
Message
 
 
À
03/05/2005 14:01:13
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
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01010484
Message ID:
01010928
Vues:
20
Serg you codes working is well.but i have some problem. this report show me how many student yet not paid fee/dues.My codes show me student that do not paid fee or dues. but your codes shows all the student which paid or not paid, my
be here problem
!(dr-cr=0)
or above pls chack agine where is some thing is missing. your codes are very very faster than mine. thanks again for you help
your codes
m.monthfm = THISFORM.monthfm.VALUE
m.monthto = THISFORM.monthto.VALUE
m.adate = THISFORM.adate.VALUE
SELECT a.CODE, SUM(a.debit) AS dr, SUM(a.credit) AS cr FROM acctran a ;
	WHERE DATE<= m.adate AND acctran.MONTH BETWEEN m.monthfm AND m.monthto ;
	GROUP BY a.CODE ;
	INTO CURSOR TempCursor
UPDATE student SET ;
    dr = opdr + TempCursor.dr, ;
    cr = opcr + TempCursor.cr ;
    FROM TempCursor ;
  WHERE student.CODE = TempCursor.CODE

SELECT * FROM student WHERE CODE>=THISFORM.codefm.VALUE AND CODE<=THISFORM.codeto.VALUE AND ;
	SEC>=THISFORM.secfm.VALUE AND SEC<=THISFORM.secto.VALUE AND scode>=THISFORM.shiftfm.VALUE AND ;
	scode<=THISFORM.shiftto.VALUE AND lcode>=THISFORM.levelfm.VALUE AND lcode<=THISFORM.levelto.VALUE AND ;
	admtd=1 AND  IIF(THISFORM.cfname.VALUE=1, fname=THISFORM.fname.VALUE, !(dr-cr=0)) ;
	ORDER BY student.lcode,sec ;
	INTO CURSOR TmpCursor
COUNT TO c
IF _TALLY > 0
	REPORT FORM (ALLTRIM(THISFORM.FILE.VALUE)) PREVIEW
	USE IN TmpCursor
	SELECT student
	DO FILTER
ELSE
	= MESSAGEBOX('Data not found for Selected Criteria', 32, PRODUCT)
	RETURN .T.
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform