Tom Moreau
3/9/2007 1:10:00 PM
You need to do it as a CTE. See my reply to your other post.
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"Lee" <lee@digital-interactive.com> wrote in message
news:1173443207.895713.26020@v33g2000cwv.googlegroups.com...
Hi
I've tried
SELECT *
FROM (SELECT businessID,
rn=Row_number() OVER(PARTITION BY businessID ORDER BY
surname)
FROM data
WHERE country = 'SINGAPORE')
WHERE rn=1
but it's reporting:
Line 6 Incorrect syntax near the keyword 'WHERE'.
Which is the
WHERE rn=1
Any suggestions?
Thanks
Lee