Jonas Levring wrote:
>
> Hejsa
>
> Jeg sidder med et lille problem...
>
> DELETE FROM forestillinger
> WHERE
> forestillinger.spilledato >= '2003-01-01 00:00:00'
> AND
> forestillinger.spilledato <= '2003-12-31 23:59:59'
> AND
> forestillinger.OpenTime = NULL
>
> I samme query skal der så kontrolleres om sum(reservation.antal) < 1 samt at
> forestillinger.uni_id = reservation.ForestillingsID
>
> Jeg håber i forstår hvad jeg vil.. håber også i kan hjælpe mig (hvilket
> egentligt er vigtigere) :))
>
> /Jonas Levring
Noget i den her retning?
DELETE FROM forestillinger
WHERE
forestillinger.spilledato >= '2003-01-01 00:00:00'
AND
forestillinger.spilledato <= '2003-12-31 23:59:59'
AND
forestillinger.OpenTime = NULL
AND
forestillinger.uni_id in
(select ForestillingsID from reservation
group by ForestillingID
having sum(antal) < 1)
--
Kristian Damm Jensen | Feed the hungry at
www.thehungersite.com
kristian-damm.jensen@cgey.com | Two wrongs doesn't make a right,
ICQ# 146728724 | but three lefts do.