Forum Replies Created

Viewing 15 posts - 6,961 through 6,975 (of 10,144 total)

  • RE: creating view from different tables

    Use the following code as a template to prepare a CREATE TABLE and INSERT script, which when run will create the tables and populate them with some sample data.

    CREATE TABLE...

  • RE: Find Similar rows and add totals together.

    leroy-1092048 (12/1/2010)


    ...

    update the row where E = Min(E) and set D with the value of SUM(D)

    delete all rows not equal to minID's

    ...

    So...how will you identify...

  • RE: Today's Random Word!

    Kit G (12/1/2010)


    Anniversary (as in my 20th wedding anniversary) :w00t:

    Hearty congratulations Mrs G!

  • RE: Are the posted questions getting worse?

    WayneS (12/1/2010)


    Chris Morris-439714 (12/1/2010)


    WayneS (12/1/2010)


    Chris Morris-439714 (12/1/2010)


    WayneS (11/30/2010)


    To all the Threadizens that have presented - how have you incorporated this public speaking into your resume? Examples would be great!

    Good Lord...

  • RE: Find Similar rows and add totals together.

    Looks like you were on the right track at the start - does this help?

    ;WITH RowPicker AS (

    SELECT A, B, C, D, E,

    Total = SUM(D) OVER (PARTITION BY A,...

  • RE: Today's Random Word!

    Ray K (12/1/2010)


    lime

    Scurvy

  • RE: Are the posted questions getting worse?

    WayneS (12/1/2010)


    Chris Morris-439714 (12/1/2010)


    WayneS (11/30/2010)


    To all the Threadizens that have presented - how have you incorporated this public speaking into your resume? Examples would be great!

    Good Lord Wayne you're morphing...

  • RE: self join

    vinoth-750003 (12/1/2010)


    hi

    Thanks for the response.

    Our problem resolved.

    by

    VinothKumar.K

    I'd recommend that you hang around for a day or two. Often a piece of klunky code like this will be superceded by...

  • RE: self join

    This is a horrible piece of code but it works:

    DROP table #Emp

    create table #Emp

    (

    empid int primary key,

    empname varchar(50),

    managerid int

    )

    INSERT INTO #Emp (empid, empname, managerid)

    SELECT 1000, 'mani', 0 UNION ALL

    SELECT...

  • RE: Delete duplicate records in a table

    chitturiii (12/1/2010)


    Hi,

    Can you please suggest me the best query to delete the duplicate records in a table with large number of records.

    Thanks in advance.

    --Chandra

    You may have to delete in batches...

  • RE: Today's Random Word!

    Here in Middle England the sun is shining through the office window. Horizontally of course but it's there and folks are brighter for it. Outside it's about 0C with a...

  • RE: Are the posted questions getting worse?

    Jeff Moden (11/30/2010)


    Grant Fritchey (11/30/2010)


    Jeff Moden (11/30/2010)


    Changing subjects, have you seen today's featured script? It comes under the category of "Are the featured scripts getting worse"? I try...

  • RE: Are the posted questions getting worse?

    WayneS (11/30/2010)


    To all the Threadizens that have presented - how have you incorporated this public speaking into your resume? Examples would be great!

    Good Lord Wayne you're morphing into Karthik :unsure:

  • RE: Are the posted questions getting worse?

    GilaMonster (11/30/2010)


    GSquared (11/30/2010)


    If it were written:

    SELECT ..

    FROM T1

    inner join T2

    on T1.a >= T2.b

    inner join T3

    on T1.a <= T3.c;

    Would you still question it? It's the same...

  • RE: How to know which join will be used first & so on?

    Query1, Query2 and Query3 are functionally the same. If you run these three queries and look at the actual plans for each one, they are very likely to be identical....

Viewing 15 posts - 6,961 through 6,975 (of 10,144 total)