I am found the solution. In one of my column I had an image file. and because I have one image file in one of my columns that I am selecting thats why I should do UNION ALL because The UNION operator by default eliminates duplicate rows from the resultset. The duplicate eliminating operation is similar to a SELECT DISTINCT. You can't use SELECT DISTINCT on a column that is text type or image type or ntext type.