I am getting compiling errors when I add the order by to the existing code. Does anyone know why I am getting this error and how to order by cc column? I get this error no matter where I put the Order By statement. I am trying to avoid using qsort function and hope I can order by within the sql code. Thanks.
Error message:
"project.c", line 56.10: 1506-045 (S) Undeclared identifier ORDER.
Code:EXEC SQL SELECT cc, cc_sn, cc_desc, cc_grp INTO :cc_lkup2[y].cc, :cc_lkup2[y].cc_sn, :cc_lkup2[y].cc_desc, :cc_lkup2 [y].cc_grp FROM cc_lkup; EXEC SQL BEGIN; ++y; ORDER BY cc; EXEC SQL END;



LinkBack URL
About LinkBacks


