Forum Replies Created

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

  • RE: select a distinct items all order by datetime

    Again your sample data doesn't have any duplicates. The output you displayed is exactly what's in the sample data.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: select a distinct items all order by datetime

    For my solution, I assumed Team ID was not required or that it was just a typo of the data. If my assumptions were both wrong, then yes, we...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: select a distinct items all order by datetime

    I believe you could just group the information:

    select sno, name, case, max(datetime) as MaxDate

    from tablename

    group by sno, name, case

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Top N returning more than N records

    oops...i just noticed the last line of your first post.

    sorry about that.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Possible to have a sql server 2005 instance on a 2008 install?

    why would you do this? I would think you would just change the compatibility of the database that needs SQL 2005 to SQL 2005.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Procedures runs in an instant, the report takes HOURS!

    are you running them on the same database server or is one test and the other production?

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: SSRS auto incrementing row number

    same answer as your other post. Look at Rank() or row_number().

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Top N returning more than N records

    Look at using the Rank() function and select a RanK() <= 3.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Snowflake tables partitioning

    fail

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: View Statements that lock tables or rows

    run profiler using the locks counters. There is a default TSQL_Locks template...try that. You should get your sql in question.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: I need help with my table design

    To answer your question: "is this design OK?"

    Yes and No. There are different approaches to storing historial data and different needs on accessing historical data. Not...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: updating data during the select statement

    I think you are asking for a SELECT that changes the values of the data during the SELECT process, but does not update the actual table....correct? If that is...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Aggregating nvarchar(max) column

    ok then...do this... (use the query i sent you as a subquery...then collapse the columns) -- typing as i think

    SELECT DataType,

    MAX(CASE

    WHEN DataType in ('CURRENCY','NUMBER') THEN CAST(MaxNumer as varchar)

    WHEN...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Growth of transaction log

    use the dbcc sqlperf(logspace) command...

    if you want to monitor it, create a table and insert the results from the command into the table.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

  • RE: Aggregating nvarchar(max) column

    First off...yes this is the WRONG way to do things.

    You won't be able to do it in a single field, but you can do it with multiple fields...

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

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