Forum Replies Created

Viewing 15 posts - 91 through 105 (of 268 total)

  • RE: Mass deletes on a table without blocking inserts

    One alternative would be to use SET ROWCOUNT and have a set based delete query:

    set rowcount 1000

    declare @continue char(1)

    set @continue = 'Y'

    while @countinue = 'Y' begin

    delete <table>

    where...

  • RE: Date Table Modified

    There may be a neater solution than this but you could set up a triggers on each table for insert, update, delete which then update rows in a table. ...

  • RE: Reindexing the system tables

    I read somewhere (but I cannot find it at the moment) that if you change the sort collation, stop and restart the SQL Service, then the indexes on the system...

  • RE: SQL query help

    Have a look at this:

    http://www.sqlservercentral.com/faq/viewfaqanswer.asp?faqid=206

    The downside is that you can only return one value at a time but if you put it code into a function then you can get...

  • RE: Remote Server vs Linked Server

    That's fixed it.

    I had to recreate the stored procedure on server #1 in QA rather than in EM.

    Thanks.

    Jeremy

  • RE: Remote Server vs Linked Server

    OK. Let's test you out on linked servers.

    I have two servers and server #2 is a linked server on server #1. Some procedures on server #1 call procedures...

  • RE: Help needed

    You will need to set up a linked server (in Enterprise Manager) and then you can query a remote database:

    select *

    from [remote_server].[database_name].[owner].[table_name]

    If you fully qualify it with...

  • RE: How to determine database used size?

    sp_spaceused without a table name gives the unallocated space in the current database.

    Jeremy

  • RE: How to get the row count of a table?

    You can use sp_spaceused @table_name which gives various bits of information about a table including the number of rows and is probably quicker than select count(*) from ....

    However, it is...

  • RE: Saving SQL table

    What do you want to save?

    If want the script (to generate the table) then right mouse click the table, select All tasks, select Generate SQL Scripts, Select the Options tab...

  • RE: How can I show results while WHILE is running

    It's very frustrating that print messages don't appear when they are printed.

    Frank's suggestion of insert rows into a temporary table is about the only practical solution I have come across....

  • RE: cursor fetch into question

    I'm not aware of anything like that. I believe that you have to declare and fetch each variable.

    Jeremy

  • RE: How do you use UDFs?

    Antares,

    I certainly agree to avoid UDFs in a where clause - I've been caught out a few times by this.

    I made the changes to my date UDF as you suggested...

  • RE: How do you use UDFs?

    H,

    I wasn't trying to steal your thread. I was trying to find out how other people use UDFs - there are a lot of people with a lot more experience...

  • RE: delta processing: alternative to cursor

    Some timings:

    No UDFs (Basic) - 1036 rows/second

    Basic + Currency Conversion UDFs - 770 rows/sec

    Basic + Date UDFs - 550 rows/sec

    Basic + Currency UDFs + Date UDFs - 480 rows/sec

    Basic +...

Viewing 15 posts - 91 through 105 (of 268 total)