Hi Guys!
The Query:
SELECT max(image_url), Model_Name
FROM (
SELECT max(image_url), Model_Name
FROM dbo.proinfo_vodafone WHERE Brand_name='Nokia'
UNION
SELECT max(image_url), Model_Name
FROM dbo.proinfo_3 WHERE Brand_name='Nokia'
UNION
SELECT max(image_url), Model_Name
FROM dbo.proinfo_t WHERE Brand_name='Nokia'
UNION
SELECT max(image_url), Model_Name
FROM dbo.proinfo_o2 WHERE Brand_name='Nokia'
UNION
SELECT max(image_url), Model_Name
FROM dbo.proinfo_orange
WHERE Brand_name='Nokia') AS temp
WHERE Model_Name IS NOT NULL
GROUP BY Model_Name
ORDER BY Model_name ASC
Is giving the error: Msg 8155, Level 16, State 2, Line 3 No column was specified for column 1 of 'temp'.
Now, to be honest I'm not good with SQL, and I made this query by using Quick Replace in a similar query and I can't seem to understand what is wrong with the query.
Please Help! Thanks in Advance.
Anchit