HELPLIB.HLB  —  RDML72  Statements  FIRST_FROM, Examples  Pascal Example
    program first_val (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';

    DECLARE_VARIABLE name SAME AS PERS.CURRENT_JOB.LAST_NAME;

    begin
    READY PERS;
    START_TRANSACTION READ_ONLY;

    GET
      name =  FIRST C.LAST_NAME FROM C IN CURRENT_JOB
              WITH C.JOB_CODE = FIRST J.JOB_CODE FROM J IN JOBS
              WITH J.JOB_TITLE = 'Company President'
              SORTED C.JOB_CODE;
    END_GET;

    writeln ('Last name is: ', name);

    COMMIT;
    FINISH;
    end.
Close Help