Forum Replies Created

Viewing 15 posts - 12,241 through 12,255 (of 26,486 total)

  • RE: Get counts grouped by time range

    Tony Farrell-305085 (5/3/2012)


    Sure -

    The user will select the day from the front end...

    This is the data i am drawing from...

    TimeIn

    2011-09-08 19:16:38.127

    2011-09-14 13:59:05.913

    2012-02-21 18:34:20.830

    2011-09-05 17:32:59.753

    2012-03-22 13:24:34.957

    2012-03-22 13:24:17.957

    2010-12-13 18:29:05.660

    2011-12-08 13:19:57.497

    2010-10-27...

  • RE: String extraction

    This looks like an extension of this one, just by a different poster. I wonder if this may be homework for a class?

  • RE: Get counts grouped by time range

    Could show you what needs to be done, but your post is light on information.

    Is this for a single day, multiple days, current day, yesterday, a specified day?

    Please read the...

  • RE: Are the posted questions getting worse?

    SQL Kiwi (5/3/2012)


    One possible test is to imagine one's mother reading the post before hitting 'reply' and wondering if it would make her proud.

    I'm not sure The Thread actually has...

  • RE: Delete duplication with where clause condition

    CREATE TABLE #temp_delete_duplicate

    (

    --emphist int identity(1,1),

    empno int,

    marital_status char(8),

    status_change_date datetime default getdate()

    );

    INSERT INTO #temp_delete_duplicate (empno, marital_status, status_change_date) VALUES (1, 'SINGLE', '01-JAN-2010');

    INSERT INTO #temp_delete_duplicate (empno, marital_status, status_change_date) VALUES (2, 'MARRIED', '01-JAN-2010');

    INSERT...

  • RE: Using COALESCE Statement And Char(13)

    Roger Abram (5/3/2012)


    OMG, that was it! Can't believe I didn't think of it.

    Thank you!

    What was it?

  • RE: Are the posted questions getting worse?

    Sean Lange (5/3/2012)


    Just an observation and a friendly reminder.

    /soapbox on

    We are starting to lean too far to the arrogant side with many of our replies (and yes I am guilty...

  • RE: Why cant I reference a column in a SQL Cursor?

    blandry (5/3/2012)


    A couple things...

    Cadavre, the code produces no errors, but it also produces no results. Or better said, all the counts are NULL. Running the same data through...

  • RE: Why cant I reference a column in a SQL Cursor?

    blandry (5/3/2012)


    Lynn,

    I read the link below your signature with Jeff's recommendations - thats not going to work. First, we are not talking about 1 table - I would have...

  • RE: Using COALESCE Statement And Char(13)

    Try this:

    SELECT @ChapterRosterText = COALESCE(@ChapterRosterText,'') + full_name + '|' + CASE WHEN PHONE IS NULL Then '' Else PHONE END+ '|' + CASE WHEN EMAIL IS NULL THEN '' ELSE...

  • RE: Delete duplication with where clause condition

    You mean something like this:

    CREATE TABLE #temp_delete_duplicate

    (

    --emphist int identity(1,1),

    empno int,

    marital_status char(8),

    status_change_date datetime default getdate()

    );

    INSERT INTO #temp_delete_duplicate (empno, marital_status, status_change_date) VALUES (1, 'SINGLE', '01-JAN-2010');

    INSERT INTO #temp_delete_duplicate (empno, marital_status, status_change_date)...

  • RE: Why cant I reference a column in a SQL Cursor?

    If the new code works, please try this slight modification (look at the WHERE clause)

    WITH CTE(n) AS(SELECT 1 UNION ALL SELECT 1),

    CTE2(n) AS (SELECT 1 FROM CTE x, CTE y),

    CTE3(n)...

  • RE: Why cant I reference a column in a SQL Cursor?

    Link is easy, first article referenced below in my signature block.

  • RE: divide column by primary and secondary

    All you need to do is cut and paste the code you have already written in an attempt to solve your problem. It would help to see what you...

  • RE: Improve Performance of this Purge Process

    MegaDBA (5/2/2012)


    Thanks guys, Here is some more info:

    Step 1marspurgeforQA runs procedure exec p_maint_usp_MarsPurgeForQA

    This step took 12 hrs 50 mins the last time it ran

    Step 2rebuild indexes and update statistics

    This step...

Viewing 15 posts - 12,241 through 12,255 (of 26,486 total)