r****5 发帖数: 618 | 1 select degree_level,year_earned,educ_code,degree_title,emp_num
from education
join degree using(educ_code)
pivot(
count(degree_level)
FOR year_earned IN ('1992,1993,1994,1995,1999,2001,2003')
);
Fails after running. ORA-00933: SQL command not properly ended
Any suggestions? | B*****g 发帖数: 34098 | 2 WITH combined AS
(SELECT degree_level,
year_earned,
educ_code,
degree_title,
emp_num
FROM education JOIN degree USING (educ_code))
SELECT *
FROM combined PIVOT (COUNT (degree_level)
FOR year_earned
IN ('1992', '1993', '1994', '1995', '1999', '2001', '2003'
))
【在 r****5 的大作中提到】 : select degree_level,year_earned,educ_code,degree_title,emp_num : from education : join degree using(educ_code) : pivot( : count(degree_level) : FOR year_earned IN ('1992,1993,1994,1995,1999,2001,2003') : ); : Fails after running. ORA-00933: SQL command not properly ended : Any suggestions?
| z**********8 发帖数: 2049 | 3 SELECT degree_level AS Number of degree level,
[1992], [1993], [1994], [1995], [1999], [2001], [2003]
FROM combined PIVOT (COUNT (degree_level)
FOR year_earned
IN ( [1992], [1993], [1994], [1995], [1999], [2001], [2003]
))
please correct it. | r****5 发帖数: 618 | 4 Beijing,
Many thanks, but I run the script and still got the following error message
ORA-00933: SQL command not properly ended
The first part works ok, just the second one "SELECT *..." does not work.
What is wrong with my original one?
Thanks again.
【在 B*****g 的大作中提到】 : WITH combined AS : (SELECT degree_level, : year_earned, : educ_code, : degree_title, : emp_num : FROM education JOIN degree USING (educ_code)) : SELECT * : FROM combined PIVOT (COUNT (degree_level) : FOR year_earned
| B*****g 发帖数: 34098 | 5 你oracle什么版本?
message
【在 r****5 的大作中提到】 : Beijing, : Many thanks, but I run the script and still got the following error message : ORA-00933: SQL command not properly ended : The first part works ok, just the second one "SELECT *..." does not work. : What is wrong with my original one? : Thanks again.
|
|