Hi all.
Kindly assist me by showing me the right way to achieve the following.
1. I have the following SQL statement which works fine
Now what I want is to achieve a WHERE statement for the united resultset..something like this:
Note that fields x and a are of the same data type.
Please assist and revert.
Thanks in advance
Kindly assist me by showing me the right way to achieve the following.
1. I have the following SQL statement which works fine
Code:
SELECT x,y,z FROM t1 WHERE x LIKE CONCAT('%',y,'%') UNION ALL SELECT a,b,c FROM t2 WHERE a =c)
Code:
(SELECT x AS A,y,z FROM t1 WHERE x LIKE CONCAT('%',y,'%')) UNION ALL (SELECT a AS A,b,c FROM t2 WHERE a =c)) WHERE A>='a' ORDER BY A
Please assist and revert.
Thanks in advance