February 11, 2005 at 12:26 am
Hi experts,
When I execute the undermentioned query, I am getting an error message telling me that "No column was specified for column 1 of 'T1'." Could someone please explain what this error message implies. I am querying on the same table, but I am using two different table aliases. So, why the conflict. In the main query I am using the table alias T, and in the subquery, I am using the table alias t1. The code looks right to me. What am I missing here? Please help.
( SELECT date
FROM Table1 T
LEFT OUTER JOIN ( SELECT MIN(date)
FROM Table1
GROUP BY Date, PhoneNumber, Amount) T1
ON T.date = T1.date
WHERE T1.date IS NULL)
Thanks,
Newbie.
February 11, 2005 at 2:28 am
Following is a good article which match exactly with your requirements
http://www.sqlservercentral.com/columnists/ccubley/findinganddeletingduplicatedata.asp
My Blog:
February 11, 2005 at 3:07 am
Change uoyr query
SELECT [date]
FROM Table1 T
LEFT OUTER JOIN ( SELECT MIN([date]) as DT
FROM Table1
GROUP BY [date], PhoneNumber, Amount) T1
ON T.[date] = T1.[DT]
WHERE T1.[DT] IS NULL
My Blog:
February 11, 2005 at 9:02 pm
Thanks guys for your responses.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy