Forum Replies Created

Viewing 15 posts - 4,096 through 4,110 (of 5,590 total)

  • RE: Obtain the date of datetime field

    Oleg Netchaev (6/2/2010)


    Something like this should do it:

    select convert(varchar(10), getDate(), 120)

    The above returns 2010-06-02 when ran at any time today.

    Hope this helps.

    For a faster method, check out the "Common Date...

  • RE: Help with Ranking Functions

    divyanth (6/2/2010)


    using a CTE instead of a sub query would improve the performance of the query

    Nope, not at all. A CTE is essentially a pre-defined sub-query (unless it's using...

  • RE: Clearing the Transaction Log

    I got lucky... I got it right. Partly from discounting some, and the rest by what didn't make sense.

    I also agree... excellent explaination of the answer.

  • RE: Using Parameters/ Variables in SSIS

    Store the result from the first query into a variable that can be used by the second query.

    See this link for more about doing this in an Execute SQL Task.

  • RE: update statement with concatenation

    _taz_ (6/1/2010)


    yes I need to store it seperate for now.

    I have never done an update with a calculation. just simple

    update table

    set columnx=y

    where columnz = null

    type of stuff

    thanks

    First, I...

  • RE: How to replace the cursor

    Nagesh S-432384 (5/31/2010)


    I 100% agree with you Jeff, my solution was for limited number of records not for huge data.

    Nag

    How many times have you been told that some code will...

  • RE: Assigning the result to a variable

    Did you try clicking the "Help" button on the Execute SQL Task Dialog box after going to the Result Set tab?

    It goes to something like this.

  • RE: Common Table Expressions overuse

    For the most part, CTEs are just a "pre-defined sub-query". The exception is recursive CTEs, where the CTE actually references itself.

    So, your query is equal to:

    SELECT EMPID, NAME

    ...

  • RE: Assigning the result to a variable

    The only way that this query is going to return a single integer value is if both queries return the same value... and that's because of the UNION (vs. UNION...

  • RE: stored procedure best practices - am I on target here?

    Peter Veilleux-436764 (6/1/2010)


    PaulB-TheOneAndOnly (6/1/2010)


    If possible I would go with a three tier development model: Dev, Test, Prod.

    Let developers play in Dev but only DBA has the power to promote code...

  • RE: Addind a new drive to a Cluster Group

    I'm not sure about the sql 2000 part (all of our clusters are on SQL 2005), but the rest of it (all Windows Server 2003) looks right.

  • RE: Query for concurrent users for a particular period.

    hester84 (5/30/2010)


    Wayne, your solution was MUCH better than mine. Cursors are evil 🙂

    :blush: Thanks.

    Yes, they are. Unless you're in a situation where you actually want things to run...

  • RE: Missing numbers in a series

    Paul White NZ (5/7/2010)


    Garadin (5/6/2010)


    To know that much about SQL Server... AND be able to write C# code. Way to make the rest of us look like schmucks ;-).

    Hey...

  • RE: Char(1), Varchar(1) or Integer as replacement for bit

    Can you use a tinyint in all of the platforms? That would only use 1 byte.

  • RE: Collapsing a Table

    Jeff Moden (5/31/2010)


    WayneS (5/31/2010)


    This post is just to include an alternate method. I haven't tested the various methods, but I believe that the "Quirky Update" solution that Jeff presented will...

Viewing 15 posts - 4,096 through 4,110 (of 5,590 total)