Re: Is this query optimized?
From: --CELKO-- <jcelko212_at_earthlink.net>
Date: Sun, 14 Jun 2009 06:38:34 -0700 (PDT)
Message-ID: <90624340-5732-4bf3-b63b-fdd5ed56cdef_at_x3g2000yqa.googlegroups.com>
Date: Sun, 14 Jun 2009 06:38:34 -0700 (PDT)
Message-ID: <90624340-5732-4bf3-b63b-fdd5ed56cdef_at_x3g2000yqa.googlegroups.com>
Why did you write in SQL Server dialect? You are posting in the wrong newsgroup. Here is one that will work in SQL Server 2008, DB2, Oracle, etc and probably perfrom well.
WITH
SELECT clr_nbr
FROM (VALUES (0), (64), (128), (192), (255))
AS Colors (clr_nbr)
SELECT R.clr_nbr AS red, G.clr_nbr AS green, B.clr_nbr AS blue FROM Colors AS R, Colors AS G, Colors AS B; Received on Sun Jun 14 2009 - 15:38:34 CEST