Forum Replies Created

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

  • RE: Correction Needed

    rcooper 78099 (3/17/2016)


    Really?

    You said: 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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. ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Optimize SP

    The Danish Dynamo (3/17/2016)


    This looks a bit heavy

    AND Calendar.Datetime >= @StartOfWeek

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How to add totals by group

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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Wildcard parameter for multiple searches

    You're welcome. Thank you for your feedback.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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