Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert codes in sql
Message
From
03/05/2005 13:11:33
 
 
To
03/05/2005 12:55:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010484
Message ID:
01010538
Views:
22
thanks Sergy your reply
When i put your codes in my codes, i get my message "data is not found"
pls study my ocmplete codes and some amend
Select 6
 Set Order To code
 Set Filter To
 Replace dr With 0 All
 Replace cr With 0 All
 Goto Top
 Do While !Eof()
     Replace dr With opdr
     Replace cr With opcr
     Skip
 Enddo
 Select 6
 Goto Top
 Do While !Eof()
     tcode = code
     Select 7
     Set Order To refno
     Set Filter To code=tcode and date<=thisform.adate.value AND month=>thisform.monthfm.value and month=<thisform.monthto.value
     Sum debit To mdr 
     Sum credit To mcr 
     Select 6
     Replace dr With dr+mdr
     Replace cr With cr+mcr
     Skip
 Enddo
 *
  
 *
 Select 6
 Set Order To lcode
 Set Filter To
 If !thisform.cfname.value=1
     Set Filter To 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 !dr-cr=0
 Endif
 If thisform.cfname.value=1
     Set Filter To 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 fname=thisform.fname.value
 Endif
 Goto Top
 Count To c
 If c>0
     Report Form (Alltrim(thisform.file.value)) Preview
     Do filter
 Endif
 If c=0
     = Messagebox('Data not found for Selected Critarea', 32, product)
     Return .T.
 Endif
and your code are here
SELECT student
tcode = CODE
m.monthfm = THISFORM.monthfm.VALUE
m.monthto = THISFORM.monthto.VALUE
m.adate = THISFORM.adate.VALUE
SELECT SUM(debit), SUM(credit) FROM acctran  ;
	WHERE CODE=tcode AND DATE<= m.adate AND acctran.MONTH BETWEEN m.monthfm AND m.monthto ;
	INTO ARRAY arTempArray
UPDATE student;
	SET dr = dr+ arTempArray[1], ;
	    cr = cr+ arTempArray[2] ;
	WHERE student.CODE = tcode
RELEASE arTempArray
my work but work is very slow
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform