1.2 Getting members based on a specified condition
Find student records in the Scores table where SCORE is 90 or above.
| STUDENTID | SCORE | 
|---|---|
| 1 | 84 | 
| 2 | 77 | 
| 3 | 69 | 
| 4 | 81 | 
| 5 | 80 | 
| … | … | 
SPL script:
| A | |
|---|---|
| 1 | =connect(“db”) | 
| 2 | =A1.query@x(“select * from Scores”) | 
| 3 | =A2.select(SCORE>=90) | 
A1 Connect to the database;
A2 Retrieve Scores table from the database;
A3 Get records where SCORE is 90 or above. By default, select()returns all records meeting the specified condition. To return the first found eligible record only, use @1 option in select() function.
SPL Official Website 👉 https://www.esproc.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.esproc.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/sxd59A8F2W
Youtube 👉 https://www.youtube.com/@esProc_SPL