Hugo Ahlenius wrote:
> The columns are (of course) named something else. Perhaps I should have
> used something else?
> 
> Jochem, your suggestion looks cleaner than mine, but SQL Server 2k chokes
> on your (CountryName, Year) in the WHERE clause. I am actually not sure
> what that does... ?

It is just a normal IN, but with multiple values on each side. If you 
expand a normal IN predicate, it looks something like:
SELECT  CountryName, Value, Year
FROM    table
WHERE
        (PKey) IN (
                (17),
                (12),
                (32)
                )

With multiple values on each side, it looks like:
SELECT  CountryName, Value, Year
FROM    table
WHERE
        (CountryName, Year) IN (
                (Sweden, 1999),
                (Denmark, 1992),
                (Norway, 1995)
                )

Maybe you should ask Microsoft to implement this feature (it is part of 
the SQL standard), but for now just use your own solution.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to