Advertisement
Guest User

Untitled

a guest
Apr 25th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- Benutzerübersicht gewinnen (LoginID, Name, Int. Durchwahl)
  2. COPY
  3.     (SELECT l.login as loginid,
  4.         a.comment as name,
  5.         n.extention as durchwahl,
  6.         t.name as type
  7.     FROM accountlogin as l, account as a, telephonenumber as n, accounttype as t
  8.     WHERE l.accountid = a.id
  9.         AND a.primarytelephonenumberid = n.id
  10.         AND a.accounttypeid = t.id
  11.         --- Keine Gruppen:
  12.         --- AND a.accounttypeid != 5
  13.     ORDER BY n.extention::int ASC)
  14. TO '/tmp/test.csv' WITH CSV;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement