DROP VIEW `stan_zuw_so_neu`;
CREATE VIEW stan_zuw_so_neu
AS 
SELECT a.wagsid, b.uid, b.vorname, b.nachname, b.hs, b.poplz, b.poOrt, b.poStrasse, b.AG, b.Jahrgang, d.standort, a.block, abdatum, pendler ,e.bezeichnung
FROM stan_ag_standort_wunsch a, stud b, stan_ag_standort c, stan_standort d, stan_vertiefungsbereich e
where a.uid=b.uid
and c.agsid=a.wagsid
and c.sid=d.sid
and c.vbid=e.vbid
and b.durchgefallen != 'Y'
and a.block != ''
and prio=0
and a.uid NOT IN (SELECT c.uid from stan_printqueue_antrag c where c.block=a.block and a.uid=c.uid)
order by nachname;