Viewing 15 posts - 11,326 through 11,340 (of 26,486 total)
For the community, sonia.burns will be posting an update shortly. We were able to figure out what was going on after numberous emails back and forth during the day.
We...
June 13, 2012 at 4:05 pm
Try this with the appropriate change for your table.
WITH BaseData AS (
SELECT
person_id,
seq_no,
created_timestamp,
ROW_NUMBER() OVER (PARTITION...
June 13, 2012 at 3:59 pm
I realize you posted quite a bit of information above. I was wondering if you might consider writing this as an article. You can expand on some of...
June 13, 2012 at 1:53 pm
WayneS (6/13/2012)
Lynn Pettis (6/13/2012)
WayneS (6/13/2012)
... Actually, I just plain forgot to remove it. I think...
June 13, 2012 at 12:54 pm
WayneS (6/13/2012)
... Actually, I just plain forgot to remove it. I think they call that...
June 13, 2012 at 12:44 pm
SQLKnowItAll (6/13/2012)
Lynn Pettis (6/13/2012)
SQLKnowItAll (6/13/2012)
UPDATE sample SET tech_mode_id = 6 WHERE ID = 3Then tell me if your code still works. Not defending mine because I know it...
June 13, 2012 at 12:26 pm
Jared and Wayne,
Do you notice that cte3 isn't even used in the final select? The final select is using cte2.
June 13, 2012 at 12:22 pm
SQLKnowItAll (6/13/2012)
UPDATE sample SET tech_mode_id = 6 WHERE ID = 3Then tell me if your code still works. Not defending mine because I know it is a mess......
June 13, 2012 at 12:17 pm
The following will also work:
declare @TestString varchar(32) = 'servername\instance';
select
left(@TestString,charindex('\', @TestString) - 1),
right(@TestString, len(@TestString) - charindex('\', @TestString));
June 13, 2012 at 12:05 pm
SQLKnowItAll (6/13/2012)
WayneS (6/13/2012)
WITH SAMPLE (REFERENCE_ID,TECH_MODE_ID,BEGIN_TIME,END_TIME) AS
(
SELECT 1, 6, CONVERT(DATETIME,'2012-05-03 20:29:22'),CONVERT(DATETIME,'2012-05-03 20:29:52') UNION ALL
SELECT 1, 5, '2012-05-03 20:29:53','2012-05-03 20:29:55' UNION ALL
SELECT 1, 5, '2012-05-03 20:29:56','2012-05-03 20:30:03' UNION...
June 13, 2012 at 11:54 am
RovanSQL (6/13/2012)
OPEN @form_dates
FETCH NEXT FROM @form_dates INTO @cid, @regdate, @compdate
/* PRINT @regdate
PRINT @compdate...
June 13, 2012 at 10:31 am
Nagaram (6/13/2012)
begin_time having incremental date also end_time having incremental date.
I need to group the Consecutive TECH_MODE records by selecting MIN(BEGIN_TIME) , MAX(END_TIME)
--...
June 13, 2012 at 10:23 am
Nagaram (6/13/2012)
Lynn Pettis (6/13/2012)
Nagaram (6/13/2012)
In my sample data TECH_MODE...
June 13, 2012 at 10:04 am
440692 I am just a number (6/13/2012)
@LynnI absolutely agree,
but (there had to be one didn't there 🙂 )
The OP did ask about how to concatenating the values back
And we...
June 13, 2012 at 10:02 am
Nagaram (6/13/2012)
I know about this..
But my problem is
-----------------------------------------------------
Looking at the following two records:
2 1 5 2012-05-03 20:29:53.000 2012-05-03 20:29:55.000 2
3 1 5 2012-05-03 20:29:56.000 2012-05-03...
June 13, 2012 at 10:01 am
Viewing 15 posts - 11,326 through 11,340 (of 26,486 total)