Forum Replies Created

Viewing 15 posts - 46 through 60 (of 458 total)

  • RE: CROSS APPLY on named sets

    SQLRNNR (1/12/2016)


    I dunno about the "correct" answer on this one. The statements compile for me but produce an error at run-time. Seems to be a bit of a mixup here.

    +1

  • RE: Splitting out a row into multiple rows.

    <snip>

    Jeff Moden (1/10/2016)


    Also notice that I've removed the drops of the Temp Tables from the end of the code because that will actually slow SQL Server down a bit. ...

  • RE: What's the Length?

    Interesting question. I learned something, b/c I don't use REPLICATE() for long strings.

    The explanation from BOL is quite specific:

    If string_expression is not of type varchar(max) or nvarchar(max), REPLICATE truncates...

  • RE: Send email from T-SQL

    Jeff Moden (1/7/2016)


    Rich Mechaber (1/7/2016)


    Hi, Jeff, we're all still waiting for this super-duper magical emailing code you allege to have concocted!

    :rolleyes:

    Rich

    First, thanks for responding. I had delete a whole...

  • RE: Send email from T-SQL

    Hi, Jeff, we're all still waiting for this super-duper magical emailing code you allege to have concocted!

    :rolleyes:

    Rich

  • RE: It's the end of the year

    <snip>

    Hugo Kornelis (12/31/2015)


    [Final note: yyyy-mm-dd is also an official ISO standard and supported for the newer data types, but the old data types for legacy reasons still support other formats...

  • RE: The Most Common Query Blunders...

    You've probably got more material than you need by this point. This one's an old article, but I still find it useful to refer people to: https://www.simple-talk.com/sql/t-sql-programming/ten-common-sql-programming-mistakes/[/url].

    My guess is...

  • RE: the use of CTEs

    Alan.B (1/4/2016)


    Except for recursive CTEs, CTEs and Subqueries are basically the same thing. I prefer CTEs for a couple things:

    First, for nested queries. CTEs make nested queries much more readable...

  • RE: the use of CTEs

    One of my more common uses of CTEs is to pre-assign row-ordered values like ROW_NUMBER(), NTILE(), etc., which I can then aggregate on in a final select.

    Any kind of grouping...

  • RE: How to convert DOB to age using DateDiff function

    ScottPletcher (12/22/2015)


    The really tricky part of this is deciding how you want to handle Feb 29 birthdays: in non-leap years, is that birthday Feb 28 or Mar 1? In...

  • RE: The Improvement

    DOH, misread the question: I thought I was supposed to return each year's HR and the delta from the previous year.

    Tough to code properly when the brain is impatient...

    Rich

  • RE: SQL Server Hits 100% CPU and nothing works

    It wasn't clear to me (I maybe skipped something posted): have you definitely identified the CPU pressure as originating from SQL Server? Are there other, non-SQL processes on the...

  • RE: An Inconceivable Scale

    robert.sterbal 56890 (12/9/2015)


    Because of the alphabet company my 5 year old daughter often asks me what a google plus some number is.

    "googol"

    Not trying to be pedantic, but I do like...

  • RE: Trying to License on the Cheap if Possible

    Following up on Thomas Rushton's suggestion, here are 3 links I've had bookmarked for quite some time for ideas to circumvent the lack of Agent in SQL Express. Haven't...

  • RE: writing queries that easily readable

    GilaMonster (12/1/2015)


    polkadot (12/1/2015)


    Seriously, does any team really have discussions about these things?

    Yes, good teams do, because they know that making time to establish standards and practices saves time later on.

    If...

Viewing 15 posts - 46 through 60 (of 458 total)