Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 8,731 total)

  • RE: 0 is equal to zero length string. Can someone explain how this can be?

    ScottPletcher (3/17/2016)


    Jeff Moden (3/16/2016)


    Sergiy (3/16/2016)


    Jeff Moden (3/16/2016)


    Lynn Pettis (8/6/2012)


    An empty string is not null, it is a known value (empty).

    I strongly agree. NULL is not NOTHING. ...

  • RE: Correction Needed

    Lynn Pettis (3/17/2016)


    rcooper 78099 (3/17/2016)


    Solution Found:

    ;with cte as (select chppon, datediff(day,

    case when chrcdt between 19000101 and 30000101 then

    convert(date,cast(chrcdt as varchar(8)),112) end,

    cast(CURRENT_TIMESTAMP as date)) as Age

    from clmhdr

    where chstat...

  • RE: Correction Needed

    You're missing the closing parenthesis for your cte.

    You also have an additional semi-colon at the start and a missing semi-colon at the end of your query.

  • RE: Optimize SP

    The Danish Dynamo (3/17/2016)


    This looks a bit heavy

    AND Calendar.Datetime >= @StartOfWeek

    ...

  • RE: Today's Random Word!

    Revenant (3/17/2016)


    DonlSimpson (3/17/2016)


    Ed Wagner (3/17/2016)


    crookj (3/17/2016)


    Manic Star (3/17/2016)


    Ed Wagner (3/17/2016)


    Grumpy DBA (3/17/2016)


    Ed Wagner (3/17/2016)


    ThomasRushton (3/17/2016)


    Grumpy DBA (3/17/2016)


    djj (3/17/2016)


    Terminator

    Genisys

    Sledgehammer

    Gabriel (Peter)

    Solsbury (Hill)

    Eyes

    Private

    Sergeant

    Colonel

    Kernel

    Windows (or any other OS)

    Doors

  • RE: How to add totals by group

    For a single column, you could use COUNT(*) OVER(PARTITION BY Status)

  • RE: Optimize SP

    If you want more accurate help, read this: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    That's a long procedure and optimizing it could take days, you won't get full help from forum posts, so either you break...

  • RE: DATEADD shortcut

    Jeff Moden (3/16/2016)


    Luis Cazares (3/16/2016)


    The new data types don't allow these operations to allow better functionality.

    That's a serious matter of opinion. I think they flubbed it in two ways...

    1....

  • RE: Today's Random Word!

    Ed Wagner (3/16/2016)


    eccentricDBA (3/16/2016)


    Grumpy DBA (3/16/2016)


    djj (3/16/2016)


    crookj (3/16/2016)


    Manic Star (3/16/2016)


    ZZartin (3/16/2016)


    Grumpy DBA (3/16/2016)


    whereisSQL? (3/16/2016)


    crookj (3/16/2016)


    Olive

    Branch

    Trunk

    Junk

    Antique

    DB2

    FoxPro

    Paradox

    SQLBase

    Sybase

    dBase

  • RE: DATEADD shortcut

    The datetime and smalldatetime types allowed arithmetic calculations based on the way the values were stored.

    The new data types don't allow these operations to allow better functionality.

    The functionality is supported,...

  • RE: Wildcard parameter for multiple searches

    You're welcome. Thank you for your feedback.

  • RE: Need help to execute a Oracle stored procedure from execute sql task

    SSIS won't accept semi-colons with the Oracle drivers.

    I'm not sure if you can make it work without the semi-colons removing BEGIN & END.

  • RE: Set @var being used in Where IN

    DON'T use dynamic SQL for this, it's a big risk for SQL injection in this case.

    You can use a splitter to separate the values in order to use IN.

    declare @Location...

  • RE: automate sql

    cory.bullard76 (3/16/2016)


    Does SQL Server Management Studio have the option to automate a query (and dump it in Excel) and email to people?

    SSMS is a client tool and does not have...

  • RE: Wildcard parameter for multiple searches

    For multiple selections, you could use the DelimitedSplit8K to split the items. You can find it in here, along with the explanation to use it: http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Here's an untested example on...

Viewing 15 posts - 3,181 through 3,195 (of 8,731 total)