Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT tle.tle_id, tle.bezeichnung, lfr.lfr_id
- FROM g1_tle tle
- LEFT JOIN g1_tll tll
- ON tle.tle_id = tll.teil
- LEFT JOIN g1_lfr lfr
- ON tll.lieferant = lfr.lfr_id
- WHERE lfr.sperre IS NOT NULL AND
- (SELECT t.lieferant
- FROM G1_TLL t, G1_LFR l
- WHERE t.lieferant = l.lfr_id AND teil = tle.tle_id AND
- (SELECT MIN(prioriaet) FROM G1_TLL t, G1_LFR l
- WHERE teil = tle.tle_id AND t.lieferant = l.lfr_id AND l.sperre IS NULL) = t.prioriaet) IS NULL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement