Forum Replies Created

Viewing 15 posts - 37,246 through 37,260 (of 59,098 total)

  • RE: DATEADD

    m.kadlag (8/17/2010)


    Hi All, I have a table with following structure:

    ID

    DATETIME

    ID will be generated for different timestamps.

    I have a small query to be written which will return the count of ID's...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Normalize a table query

    bonggoy cruz (8/19/2010)


    I have the following table:

    ID, Description, Field1, Field2 ... Field9

    Field1 to Field9 are all nullable fields.

    I want a query to return as follows:

    ID, Description, Field1

    ID, Description, Field2

    ID, Description,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: DATEADD

    You're welcome, Ron, and thanks for the feedback. I knew I did ok... just had no idea of how ok. Thanks, guys.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The Logic, Mathematics, and Utility of NULLs

    David Webb-200187 (8/17/2010)


    Yep, that pretty well sums it up. I've been reading Hugh Darwen for a couple of days and working through Tutorial D and the Rel implementation. ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Query to write for Report

    khushbu (8/17/2010)


    Not able to get the things working. Might be someone can help

    My input table looks like

    IDLogical_DrivesFree_SpaceSQL_ServerDate

    0C ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Retrieving values of a tree structure into a table

    Dan2010 (8/16/2010)


    Hi, I have a table that has 2 columns as Child and Parent in the following form.

    Child Parent

    A NULL

    B A

    C A

    D C

    E C

    F D

    G NULL

    The tree structure is as...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: ssis and ssrs interview questions

    I just got done with a long run of interviews for a Sr. Systems DBA and an SQL Server T-SQL Developer. There were about 8 candidates for each job....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Run SQL script with SQLCMD

    Mohit K. Gupta (8/17/2010)


    Jeff actually that does work without double quotes (just did it today :P); no issues :D. But I usually put -SServerName\InstanceName and avoid using "-" in...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: replacing long running cursor

    Chris Morris-439714 (8/17/2010)


    Jeff Moden (8/17/2010)


    Oh, I see it coming...

    Heh Jeff got that porkchop launcher loaded up for the first triangular join post? 😀

    Z'actly 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How to tell difference betwwen empty string and one or more blanks

    sgambale (8/17/2010)


    A developer asked me about this. He did not elaborate except to say there were user issues involved.

    I don't think anyone should need to distinguish between one vs...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: How to split character from string

    Simplify with a real Tally table...

    SELECT e.EmployeeID,LOWER(SUBSTRING(e.EmployeeName,t.N,1)) AS SplitChar

    FROM #Employee e

    CROSS JOIN dbo.Tally t

    WHERE t.N <= LEN(e.EmployeeName)

    ORDER BY e.EmployeeID

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Error in Generating scripts

    Bhuvnesh (8/18/2010)


    Anamika (8/18/2010)


    Hi,

    SELECT * FROM [font="Arial Black"]SYSOBJECTS[/font] WHERE XTYPE = 'P'

    output of this query gives the new SP name.

    My problem is while getting the create script for the same gets...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: DATEADD

    Gosh, Luke... :blush: You've absolutely made my week... maybe my year. I'm humbled by your incredible comments. I really appreciate your feedback because I've had a whole lot...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: clustered or nonclustered index for UserId?

    GilaMonster (8/17/2010)


    Jeff Moden (8/17/2010)


    You don't actually need to make the nonclustered index as (UserID,ID) because ID (the clustered index) will automatically be added to the UserID but it does make...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/17/2010)


    Roy Ernest (8/17/2010)


    Jeff, Thank You. Our user group would love that. maybe for September we could try that out? 🙂 Thanks once again. 🙂

    More info, please......

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 37,246 through 37,260 (of 59,098 total)