INSERT INTO fspx60_temp SELECT class, chemistry, "2" as "discipline code" FROM cj21 WHERE class=BJH AND code (" 2 "$) ORDER BY chemical DESC TOP 60 PERCENT
Because the top of the select clause use 60 percent out there are differences in data and expected, after now want to sort by number of article, set a variable in advance: tiaoshu, after statistical values assigned to tiaoshu, then the statement is revised as follows:
INSERT INTO fspx60_temp SELECT class, chemistry, "2" as "discipline code" FROM cj21 WHERE class=BJH AND code (" 2 "$) ORDER BY chemical DESC TOP tiaoshu
Again, prompt invalid TOP
What's the problem, how to solve??
CodePudding user response:
How to use grammar first carefully study the SQL commandCodePudding user response:
Maybe you calculate tiaoshu & lt;=0