Viewing 15 posts - 541 through 555 (of 1,229 total)
SQL Kiwi (1/26/2012)
ChrisM@home (1/26/2012)
Heh Paul that's too funny!
I thought the same thing! We must have been working on the opposite solutions at the same time. I must confess...
January 26, 2012 at 2:24 am
Much better sample set, thanks:
;WITH GroupedData AS (
SELECT mid, datum, id_status,
GroupID = ROW_NUMBER() OVER (PARTITION BY mid ORDER BY datum, id_status) -
DENSE_RANK() OVER (PARTITION BY mid, id_status ORDER BY...
January 26, 2012 at 12:46 am
;WITH phs_termine AS (
SELECT mid = 47,datum = '2006-07-13',id_termine_status = 9 UNION ALL
SELECT 47,'2006-07-19',1 UNION ALL
SELECT 47,'2006-09-18',1 UNION ALL
SELECT 47,'2006-09-19',1 UNION ALL
SELECT 47,'2006-09-21',1 UNION ALL...
January 26, 2012 at 12:34 am
kirkdm01 (1/24/2012)
I have a cte that loops through the records creates a list and i pass a parameter of @ParamterID in a select statement ...
Check that your rCTE works before...
January 24, 2012 at 5:25 am
kirkdm01 (1/24/2012)
how do you create an index on ParentPostID im new to SQL so im just learning. What do i do
What's your working environment, Kirk? Are you on your own/do...
January 24, 2012 at 4:07 am
-- use a more appropriate value for the size of @log_file_path:
SET @log_file_full_path [NVARCHAR(255)]
= @log_file_path [VARCHAR(512)]
+ @database_name [VARCHAR(32)]
+ @cnv_extension [VARCHAR(4)]
+ @ldf_extension [VARCHAR(4)]
January 24, 2012 at 3:06 am
Hi Lowell
This seems to work - at least, the logic is correct according to my interpretation of your requirements. If you add a nonsense character to one of the user's...
January 24, 2012 at 2:30 am
kirkdm01 (1/23/2012)
January 24, 2012 at 12:16 am
DBA Rafi (1/23/2012)
The Plan I posted is from my QA database.
Hi Rafi
This is the estimated plan, can you post the actual plan please?
Cheers
ChrisM
January 23, 2012 at 12:29 pm
See also 'SET QUOTED_IDENTIFIER (Transact-SQL)' in Books Online, the help system for SQL Server. Double quotes have a special meaning in SQL Server (by default).
January 23, 2012 at 12:23 pm
Here's some results of testing the usual method against a rCTE
Tests were performed against a million rows, consisting of a frame of 50 seed rows repeated with non-overlapping dates.
With...
January 23, 2012 at 7:22 am
Mark-101232 (1/23/2012)
DECLARE @t TABLE(DateValue datetime,Value int)
INSERT INTO @t(DateValue,Value)
SELECT '20120102',0 UNION ALL
SELECT '20120103',1 UNION ALL
SELECT '20120104',1 UNION ALL
SELECT '20120105',1 UNION ALL
SELECT '20120106',1 UNION ALL
SELECT '20120107',1 UNION ALL
SELECT '20120108',0 UNION ALL
SELECT '20120109',1...
January 23, 2012 at 6:30 am
drop table #testvalue
create table #testvalue (datevalue datetime,value int)
insert into #testvalue (datevalue, value) VALUES
('2012-01-02', 0),
('2012-01-03', 1), -- MIN
('2012-01-04', 1),
('2012-01-05', 1),
('2012-01-06', 1),
('2012-01-07', 1), -- MAX
('2012-01-08', 0),
('2012-01-09', 1),
('2012-01-10', 1),
('2012-01-11', 0),
('2012-01-12', 1), -- MIN
('2012-01-13',...
January 23, 2012 at 6:29 am
ananda.murugesan (1/23/2012)
Procedure Cache Hit Ratio
Percentage of time when SQL Server looks for an execution plan in the procedure cache and finds...
January 23, 2012 at 3:34 am
Viewing 15 posts - 541 through 555 (of 1,229 total)