Re: Problem with UNION

2006-03-01 Thread Rhino
"Shaun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, The following 3 queries on their own produce more rows than if I UNION them together: SELECT CONCAT('Y',DATE_FORMAT(Date,'%Y')) AS Booking_Year, CONCAT('M',DATE_FORMAT(Date,'%c')) AS Booking_Month, CONCAT('USR_', B.User_I

Re: Problem with UNION

2006-03-01 Thread Gabriel PREDA
The UNION Syntax is: SELECT ... UNION [ALL | DISTINCT] SELECT ... [UNION [ALL | DISTINCT] SELECT ...] Lower in the manual it says: * A DISTINCT union can be produced explicitly by using UNION DISTINCT or implicitly by using UNION with no following DISTINCT or ALLkeyword. * ** So the

Problem with UNION

2006-03-01 Thread Shaun
Hi, The following 3 queries on their own produce more rows than if I UNION them together: SELECT CONCAT('Y',DATE_FORMAT(Date,'%Y')) AS Booking_Year, CONCAT('M',DATE_FORMAT(Date,'%c')) AS Booking_Month, CONCAT('USR_', B.User_ID) AS User, Booking_Status, CONCAT('W_', Work_Type_ID) AS Day_Type, '1'