What version of MySQL are you using? UNION is implemented in MySQL 4.0.0.
Check out http://www.mysql.com/doc/en/UNION.html
for more information.

Victor Pendleton


-----Original Message-----
From: Garry Rothert [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 8:11 AM
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

Reply via email to