Kenzuke

Aufgabe 3 - 2017

Jan 26th, 2020
369
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DATA:
  2. wa_spfli type spfli,
  3. wa_sflight type sflight,
  4. wa_scarr type scarr,
  5. summe type i,
  6. anz_fluege type i,
  7. avg(4) type p DECIMALS 2.
  8.  
  9. select * from scarr into wa_scarr.
  10.   SELECT * FROM spfli INTO wa_spfli WHERE carrid = wa_scarr-carrid.
  11.     write:/ wa_scarr-carrid, wa_scarr-carrname, wa_spfli-connid, wa_spfli-cityfrom,wa_spfli-cityto.
  12.     SELECT * FROM sflight INTO wa_sflight WHERE carrid = wa_spfli-carrid AND connid = wa_spfli-connid.
  13.       anz_fluege = anz_fluege + 1.
  14.       summe = summe + wa_sflight-seatsocc.
  15.       write:/ wa_sflight-fldate, wa_sflight-price,wa_sflight-currency,wa_sflight-seatsocc.
  16.       ENDSELECT.
  17.       avg = summe / anz_fluege.
  18.       WRITE:/ anz_fluege. write:/ avg.
  19.       anz_fluege = 0.
  20.       summe = 0.
  21.       ENDSELECT.
  22.       ENDSELECT.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×