MySQL Forums
Forum List  »  Italian

Re: Problema SQL
Posted by: goldemish
Date: March 16, 2007 06:12AM

Ho provato con una subquery:

SELECT * FROM STRUTTURE s WHERE NOT EXISTS (

SELECT id FROM PRENOTAZIONI k WHERE (
($datain BETWEEN k.dal AND k.al)
OR
($dataout BETWEEN k.dal AND k.al)
OR
(k.dal<=$datain AND k.al>=$dataout)
)AND s.id=k.id_struttura

)

Troppo complicato? Si può ottimizzare?

Grazie

Options: ReplyQuote


Subject
Views
Written By
Posted
3948
March 15, 2007 05:12PM
Re: Problema SQL
2527
March 16, 2007 06:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.