1. SET feedback off;
  2. SET echo off;
  3. SET verify off;
  4. SET heading off;
  5. SET trim ON;
  6. SET tab ON;
  7. SET colsep ' ';
  8. SET trimspool ON;
  9.  
  10. SET term off;
  11. spool bil_user.txt
  12. SELECT
  13. (
  14. cast(cd.id_str AS varchar(20))
  15. || ' ' || coalesce(cp.id_place, 0)
  16. || ' ' || coalesce(cp.id_connect, 0)
  17. || ' ' || coalesce(cd.ip_adr, ' ')
  18. || ' ' || coalesce(cd.owner, ' ')
  19. || ' ' || coalesce(cd.login_name, ' ')
  20. || ' ' || coalesce(cp.address, ' ')
  21. ) AS record
  22. FROM
  23. BIL.CONNECT_DETAIL cd
  24. LEFT JOIN BIL.CONNECT_PLACES cp ON (cp.id_place = cd.id_place)
  25. ;
  26. spool off;
  27. SET term ON;
  28.  
  29. exit
  30.  
  31.