Forum Replies Created

Viewing 15 posts - 1 through 15 (of 50 total)

  • RE: @@IDENTITY not returning proper INT

    Just one of the reasons for avoiding triggers unless they're absolutely essential. They hide code away that frequently makes it difficult to identify what look like bugs.

    If inserts are...

  • RE: BULK INSERT - Overly large table

    Do you have a clustered index on your table? Could be that if your data isn't sorted in the same order, then a lot of page splits are occurring, with...

  • RE: sql table reorganization

    No idea offhand - I've always used dbreindex.

    From BOL though, it looks like rebuilding the index is more thorough, but as you say, it's an offline operation.

    I guess it depends...

  • RE: sql table reorganization

    Rebuilding the clustered index on your tables will sort it out.

    Either use dbcc dbreindex(table_name, index_name) or create clustered index index_name on table_name(column_list) with drop existing

  • RE: Temp tables and performance

    I can't say for sure since I haven't played with table variables very much, but I'd suspect that they're basically a convenience and that the underlying implementation will not differ...

  • RE: Nested Cursors

    Sorry, I didn't notice the space in [report 1]. I'd really recommend that you don't use spaces in identifiers - they're more trouble than they're worth.

    Anyway, I think the amendment...

  • RE: Trigger Help

    Best get on with it then!

  • RE: Fun little UDF puzzle

    Hmmmmm. Not much fun with functions! Here's a solution in a stored procedure. Will do the job in some cases, but WHERE is the val() function in SQL? It's been...

  • RE: Nested Cursors

    How's this?

    It loops through each storetype, but within the loop, it just does a couple of set-oriented operations, so would be very fast, even if you have thousands of stores...

  • RE: Nested Cursors

    There are probably lots of 'clever' things that you can do with cursors, but why would you bother?

    Learn how to code SQL properly (ie. without cursors) or switch to working...

  • RE: 80 columns by 6 million rows

    You only have one index, on a large table of static data?

    Create some more!

    If you're not adding new data, then you don't need to worry about the effects they might...

  • RE: Temp tables and performance

    There is no hard and fast rule. Good coding is usually far more important than the chosen execution method.

    If you're not sure, then try both!

  • RE: Gurus pls help - Fine tuning using Indexes

    The general answer would be to create two seperate indexes. This is because you plan to do queries which are restricted on one field only ie. queries 1 and 2...

  • RE: Difficult query on 5 tables w/ weighting

    Andrew, could you post the schema for each of your tables and if possible a couple of sample rows for each?

    I suspect that this problem isn't too diificult, but more...

  • RE: "Save AS" Database.

    Just backup and restore to a different database name. eg :

    restore database new_db from disk = 'c:\old_db.bak' with replace,

    move 'file1' to 'c:\new_file1.mdf',

    move 'log1' to 'c:\new_log1.ldf'

    You'll need a MOVE statement for...

Viewing 15 posts - 1 through 15 (of 50 total)