Forum Replies Created

Viewing 15 posts - 226 through 240 (of 423 total)

  • RE: Time Problem

    Maybe this is getting closer? It still has issues with the first and last entry of a batch. For any time gap more than 1 hour I just add one...

  • RE: Counter inside SELECT

    RZ52 (3/7/2013)


    Thanks for suggestion. I think this would also help me in other situations as this has less limitation.

    Another advantage of this method is that you can make an inline-table...

  • RE: Time Problem

    This turned out to be much trickier than I thought. I figured out a way to do it in two passes. May not be optimal and I didn't have time...

  • RE: Question to you all on MERGE

    I always use MERGE now rather than several IF blocks (unless I'm stuck with SQL2005 and earlier). It's important to test the merge before using it on live data though!...

  • RE: Counter inside SELECT

    Just to add another option with a slightly more complex query that doesn't require a seed value. Also, by adding identity columns it will keep the rows in the same...

  • RE: Time - Adding minutes and seconds

    Sergiy (3/5/2013)


    Steven Willis (3/4/2013)


    As for the time being bound to the date...well, no, not in this case. As I pointed out in the OP the data I'm getting from the...

  • RE: XML Output - Fields in reverse order?

    You can check the collation on your db with:

    (code from Pinal Dave)

    SELECT

    c.name

    ,c.collation_name

    FROM

    sys.columns c

    WHERE

    OBJECT_ID IN

    ...

  • RE: XML Output - Fields in reverse order?

    This is what I got when I used your code in SSMS as is. It looks correct for me. So perhaps something specific to your database settings (like collation) is...

  • RE: Really confused newbie - Perhaps a Temp Table query?

    calvo (3/5/2013)


    Steven Willis (3/5/2013)


    Another old habit to break if you are using SQL2008 or greater is to avoid GROUP BY when all you really need is an aggregated column value.

    ...

    You...

  • RE: Really confused newbie - Perhaps a Temp Table query?

    Another old habit to break if you are using SQL2008 or greater is to avoid GROUP BY when all you really need is an aggregated column value.

    SELECT

    ...

  • RE: date format 7/31/2013

    Here's another option for formatting dates. I didn't create the logic behind this function other than to turn it into an iTVF rather than its original scalar form. I don't...

  • RE: Time - Adding minutes and seconds

    Sergiy, you make some good points. However, in my original post I wasn't particularly concerned with the excess of zeroes because like you said, it's better that the UI handle...

  • RE: how to get list of databases and updte support group for them in SQL CMS

    newdba_sql (3/4/2013)


    i dont know what I am askingfor is possible or not so just want to give a try here...:-)

    I want to get a list of all databases and servers...

  • RE: Use parameter value in .csv output filename

    OK, here's a start. I'm sure the gurus will find a way to maximize this such as getting rid of the WHILE loop. I tried to do it without a...

  • RE: SET ROWCOUNT

    Jeff gives good advice...but I will agree that SET ROWCOUNT 0 is not exactly intuitive.

    Hmmm... now is it SET NOCOUNT 0 or SET NOCOUNT OFF? Do you expect consistency?...

Viewing 15 posts - 226 through 240 (of 423 total)