I want to join the results given by two queries and avoid duplicates in this is there any way to do so.
Hi Ashish
Thanks for help but i am getting this error not sure what is this as i am a newbie to SQL. here is the error...
All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
the error suggests that you need to have same number of columns on all the queries separated by UNION. Also datatypes of corresponding columns in queries should be same (i.e if 3rd column in first query is int then 3rd column in other queries should also be int or some value which can be casted to int.
poncho: Hi Ashish Thanks for help but i am getting this error not sure what is this as i am a newbie to SQL. here is the error... All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.
Post the code you used
Madhivananhttp://beyondrelational.com/blogs/madhivanan