Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert into sql
Message
From
21/07/2010 14:15:12
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01473321
Message ID:
01473324
Views:
46
>Can these codes change into sql.
>
>
>sele res
>SET ORDER TO CODE
>GO TOP
>DO WHILE .NOT. EOF()
>IF PERC>=80 .AND. PERC<=100
>	REPL GRADE WITH "A+"
>ENDIF
>IF PERC>=70 .AND. PERC<79.99
>	REPL GRADE WITH "A"
>ENDIF
>.............
>
You can do it in two SQLs such as:
UPDATE Res SET Grad="A+" WHERE Perc>=80 AND Perc<=100
UPDATE Res SET Grad="A" WHERE Perc>=70 AND Perc<=79.9
But, there is a way to do it in one command. Maybe someone else will contribute.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform