Forum Replies Created

Viewing 15 posts - 61 through 75 (of 920 total)

  • RE: Packing Optimization

    You might want to start here:

    https://www.simple-talk.com/sql/t-sql-programming/bin-packing-problems-the-sql/

    Mr. Celko is always an interesting read unless he happens to be answering a forum question.


    And then again, I might be wrong ...
    David Webb

  • RE: need help with trigger

    Yes, what Sean said, and:

    Your 'where' clause in the update doesn't actually limit any rows in the table because it doesn't check any columns in the table. So it...


    And then again, I might be wrong ...
    David Webb

  • RE: Nested CASE WHEN in SELECT

    If you remove all the case logic and just execute the query with the join intact, do you still get the duplicate rows?


    And then again, I might be wrong ...
    David Webb

  • RE: Error while executing a function

    Can you post the actual function and the sql that's calling it?


    And then again, I might be wrong ...
    David Webb

  • RE: Convert to numeric overflow issue

    The original definition would hold

    1234567890123456.123456

    The new definition won't. So if you have a number with greater than 14 positions left of the decimal, you'll get a message. That's...


    And then again, I might be wrong ...
    David Webb

  • RE: rounding issues

    What does:

    round(cast(sum(columnname) as numeric(5,3))*100.00,3)

    give you?


    And then again, I might be wrong ...
    David Webb

  • RE: Granting select to all databases current and future?

    Haven't tried this, but you could set them up with the db_datareader role in the Model database. When Model is copied as the basis for any new database, the...


    And then again, I might be wrong ...
    David Webb

  • RE: Error In Trigger : Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression

    I don't see where the code you posted could have generated that error. Is there another trigger on that table? How did you determine the error originated in...


    And then again, I might be wrong ...
    David Webb

  • RE: Creating Database: Error Message.

    The create database is run in the context of the account under which the sql sever is running. Check the permissions for that account, not your account.


    And then again, I might be wrong ...
    David Webb

  • RE: wildcards

    WOW! If you calculate the value of 1 point as the combined hourly rate of all the people who have posted about this question, SQL Server Central should probably...


    And then again, I might be wrong ...
    David Webb

  • RE: Creating a CSV file from a Trigger

    If the process loading the data is a scheduled job, I'd put the csv creation into the job as another step. If it's a user-initiated process, you could have...


    And then again, I might be wrong ...
    David Webb

  • RE: Cumulative total column wise

    If you're not doing any other summation or grouping, I'm not sure you'll find anything more efficient than the straight 'select' in my question. It would only touch the...


    And then again, I might be wrong ...
    David Webb

  • RE: Cumulative total column wise

    Not a solution, just a clarification, you need the cumulative total adding each month to the previous month like

    select opco, region, country, jan as [jan],

    ...


    And then again, I might be wrong ...
    David Webb

  • RE: Microsoft SQL 2008 R2 Backup and Restore

    So, normally I don't weigh in on stuff like this, but here goes. Your original post speculated that your difficulties were caused by the lack of brainpower at Microsoft,...


    And then again, I might be wrong ...
    David Webb

  • RE: Application Error

    A SQL Profiler trace might give them a clue, and if you can get the app into some kind of debug mode with verbose diagnostics, that might help also. ...


    And then again, I might be wrong ...
    David Webb

Viewing 15 posts - 61 through 75 (of 920 total)