Forum Replies Created

Viewing 15 posts - 51,916 through 51,930 (of 59,072 total)

  • RE: Re-arrainge a character field

    Thanks for the feedback, Marvin. Yeah, and if you throw in a check by IsDate, you can control the error instead of throwing it against the wall to see...

  • RE: Using VBScript to Automate Tasks

    Thanks Timothy... That's why I normally don't use VBS scripts... I can do almost everything with T-SQL. 🙂

  • RE: How to write a query to join 2 table

    There's just nothing like someone providing instant confirmation for us folks just finally getting into 2k5... 🙂 Thanks, Matt.

  • RE: Cursor in SQl Server

    rbarryyoung (3/10/2008)


    Lynn Pettis (3/10/2008)


    Cursors may be evil, but they may be a necessary evil...

    In my experience they are necessary and acceptable for only one thing: variable-izing SQL objects in the...

  • RE: Can a temporary table created with an execute statement survive that statement?

    kent waldrop (3/10/2008)


    Jeff:

    What are the circumstances for that? When I run the following query it get the commented results:

    use tempdb

    go

    select name as before from sysobjects where type = 'U'

    exec...

  • RE: Is it possible to do it in one query?

    Guess it's time for porkchops here... Vika, if you want really good answers the first time around, see the URL in my signature line...

  • RE: How to write a query to join 2 table

    Pivot also has some limits... I believe you can only Pivot based on one column...

  • RE: how to choose composite index

    I disagree... a lookup or definition table better have a Primary Key...

  • RE: Help with Year calculations

    Sorry Lynn... it was more directed at the OP than you...

    Also, we'll probably disagree on this, but the new DATE only and TIME only datatypes are a real loss of...

  • RE: Cursor in SQl Server

    Problem is... most people give up on trying to find a good set-based solution way too early...

  • RE: How to lay out SQL Code

    OK, then move on to one that does interest you

    Whether I agree or not, it's still interesting and dialog about such subjects are one way for folks to exchange ideas...

  • RE: Help with Year calculations

    alorenzini (3/10/2008)


    That worked fine. Thanks.

    See above and reconsider how much hell you will go through if any of the dates ever come in with a time other than midnight... and...

  • RE: Help with Year calculations

    Lynn Pettis (3/10/2008)


    Jeff, since the OP wants the end of the year wouldn't you want this:

    SELECT @startdate = CAST('2007' AS DATETIME)

    SELECT @enddate = DATEADD(yy,1,CAST('2007' AS DATETIME)) - 1

    I know why...

  • RE: Need help with selecting primary key!

    There are, of course, exceptions to every rule... but most people name a table after what a single row in the table holds. For example, the Customer table would...

  • RE: Is it possible to do it in one query?

    First, I thought you said the "records" looked like this...

    PunchIn, PunchOut, Break, PunchIn, Punchout.

    Second... are your really happy with the solution? Try it with multiple days...

    USE tempdb

    go

    Create Table Punches(empid...

Viewing 15 posts - 51,916 through 51,930 (of 59,072 total)