Garry, You are using mysql version 4? Unions are only supported in version 4.
If so, the only difference I can see from your example to the manual is that each select is in brackets in the manual. Try the query: (select cnumber from spouse where fd_status = "A") union (select cnumber from members where fd_status = "A"); Andy > -----Original Message----- > From: Garry Rothert [mailto:[EMAIL PROTECTED]] > Sent: 16 January 2003 14:11 > To: [EMAIL PROTECTED] > Subject: Need help with UNION > > > Hi > I am attempting a simple union. > > select cnumber from spouse where fd_status = "A" > union > select cnumber from members where fd_status = "A" > > When I run this SQL statement I get the following error. > > ERROR 1064 : You have are an error in your SQL syntax near 'union > select cnumber from members where fd_status = "A"' at line 2. > > CNUMBER is smallint in both tables. I know this seems like a silly > union to try but I've simplified a more complex statement to > troubleshoot, I can't get any union to work. > Thanks > > This email and any files transmitted with it are privileged, > confidential, > subject to > copyright and intended solely for the use of the individual or entity to > whom they > are addressed. Views expressed are those of the user and not > necessarily those > of DPH Engineering Inc.. Any unauthorized use, copying, review or > disclosure is > prohibited. Please notify the sender immediately if you have received > this > communication in error. Thank you for your assistance and co- > operation. > > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- 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