write the SQL statement to retrieve the 2nd Highest salary
ammount(File Name="EMPLOY",Field Name="SALARY")
Answer Posted / kamal
hi,
select max(salary) from empfile where salary <(select max
(salary from empfile))
or
select salary from empfile a 2=(select count(salary) from
from empfile b where b.salary>=a.salary)
| Is This Answer Correct ? | 24 Yes | 2 No |
Post New Answer View All Answers
Difference Between Source Physical File & Physical File?
what is procedure prototype and procedure interface.
How to reverse a string using RPG?
how to toggle between single line and multi - line display of a particular record in a subfile?
i am using non join multiple format my 3 database file is like that pf97 R REC ENAME ETENNO ESTATUS K ENAME pf98 R REC1 ENAME ESAL K ENAME PF99 R REC3 ENAME CRDCARD EID K EID & MY NON JOIN LOGICAL FILE IS ALSO SAME EXCEPT RECORD NAMES BEFORE I TRIED WITH 2 FILES SO ITS SAYS ERROR I.E.(Key field attributes must be same as for previous formats. ) SO I CHANGED KEYFIELD ACCORDING TO PF SO ITS WORKING BUT AFTER ADDING 3 FILES ITS SAYING SAME ERROR . I DONT KNOW I NEW IN AS400 PLLZ HELP ME I HAVE ONE MORE QUE. CANT BE USE DIFFERENT KEYFIELD (NOT ACCORDING TO PF) IN NON JOIN LOGICAL FILE.
what is the maximum number of fields under a record format of physical file?
what is overlay?
In RPG How to read a records from a file without using read opcodes?
what is the purpose of ovrdta (override data) keyword?
define a shared access path?
any one have give AS400 study material? pls pass it to gopalsai789@gmail.com
where can you specify an indicator in lokup operation?
what is a logical file?
when would you prefer logical file than opnqryf?
is it possible to create a physical file without dds?