Jessica, Monday, January 28, 2002, 3:13:11 PM, you wrote:
JR> Can anyone help me - JR> I am trying to extract data on the availability of a holiday villa using the JR> statement JR> 'SELECT PossDate from JuneDates where not exists(SELECT PossDate FROM JR> Reservation WHERE PossDate Between ArrDate And DeptDate AND JR> Reservation.VillaID=\'Adonis\')'. JR> (This was originally done on an Access database) JR> I get an error message that says JR> 'you have an error in your SQL syntax near " exists(SELECT PossDate FROM JR> Reservation WHERE PossDate Between ArrDate And DeptD" ', JR> so I presume it doesn't like the 'where not exists' part. JR> Can anyone tell me of an alternative to this please?? MySQL doesn't support subselects, check the following link: http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html You can also try to use temporary tables. See at: http://www.mysql.com/doc/C/R/CREATE_TABLE.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php