General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Dear
PUBLIC NAME1,OBMARKS,TOTMARKS
STORE SPACE(30) TO NAME1
STORE 0 TO OBMARKS,TOTMARKS
CREATE TABLE Master1 (NAME1 C(10), OBMARKS N(4),TOTMARKS N(4))
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("A",400,850)
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("B",685,850)
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("C",700,850)
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("D",200,850)
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("E",279,850)
INSERT INTO Master1 (NAME1,OBMARKS,TOTMARKS) VALUES ("F",510,850)
Test = "csr" + SYS(2015) && gives you unique cursor name everytime
SELECT *,;
TRANSFORM((OBMARKS/TOTMARKS)*100,"##.##") AS PERCENTAGE;
FROM Master1;
ORDER BY PERCENTAGE DESCENDING;
INTO CURSOR XYZ
SELECT XYZ
BROW
I hope this will help
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only