Viewing 15 posts - 796 through 810 (of 7,636 total)
also, please give us the reasons for not wanting to use Dynamic SQL, don't make us grope around in the dark.
February 26, 2010 at 8:48 pm
emily:
Why do you want to cram two different functional tasks into one procedure? Thats been bad design in software development for over forty years. This obviously belongs in...
February 26, 2010 at 8:37 pm
Jeff Moden (2/26/2010)
Heh... poor ol' dynamic SQL... nobody loves it anymore.
It's sad, when the cure is worse than the disease.
Oh well, I'll be killing swine and birds all weekend for...
February 26, 2010 at 8:24 pm
Huh, thats odd. When I tested it on my system this morning, with a million rows, no GROUP BY (did I miss that requirement?) and an index on...
February 26, 2010 at 7:51 pm
Glad we could help, Randy.
February 26, 2010 at 7:44 pm
This seems a bit more efficient:
SELECT
date_value = CASE WHEN (COUNT(*) > COUNT(date)) THEN NULL ELSE MIN(date) END
FROM test
🙂
February 26, 2010 at 6:55 am
RBarryYoung (2/24/2010)
Paul White (2/24/2010)
RBarryYoung (2/23/2010)
February 24, 2010 at 4:38 pm
Paul White (2/24/2010)
RBarryYoung (2/23/2010)
February 24, 2010 at 4:36 pm
CirquedeSQLeil (2/24/2010)
Look at that, Barry needs 23 points for 9000 - big milestone.
Heh, I hadn't even noticed...
February 24, 2010 at 4:34 pm
If you want to see what a SPID is doing, then Profiler/trace is how to do it.
Sorry, but I do not have any Java Persistence API experience. And yes,...
February 24, 2010 at 4:31 pm
Paul White (2/24/2010)
RBarryYoung (2/23/2010)
February 24, 2010 at 3:10 pm
mansshah (2/24/2010)
February 24, 2010 at 2:54 pm
mansshah (2/24/2010)
=====
CREATE TABLE [dbo].[FLOAT_DATA](
[FD_TAG_FK] [int] NOT NULL,
[FD_DATETIME] [datetime] NOT NULL,
[FD_VALUE] [real] NULL,
[FD_UNIT_FK] [smallint] NULL,
[FD_QUALITY] [tinyint] NULL,
CONSTRAINT [PK_FLOAT_DATA] PRIMARY KEY CLUSTERED
(
[FD_TAG_FK] ASC,
[FD_DATETIME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE...
February 24, 2010 at 2:50 pm
Viewing 15 posts - 796 through 810 (of 7,636 total)