Forum Replies Created

Viewing 15 posts - 361 through 375 (of 382 total)

  • RE: best way to delete two million rows

    thank you all!!! i apreciate it!!! 😀

  • RE: best way to delete two million rows

    this table is coming from a tables which is used to insert rows every second. i have already a job in which rows get inserted from table1 where the...

  • RE: best way to delete two million rows

    THANKS! ok just so i understand... the loop query what it does is delete the rows by 100 rows each time (small batches) until there are 0 rows correct then...

  • RE: best way to delete two million rows

    yes i am so sorry i am working on a sql server 2000, so then how would i just get the top 100?

  • RE: best way to delete two million rows

    hi again, Server: Msg 156, Level 15, State 1, Line 4

    Incorrect syntax near the keyword 'top'.

    when i try to run the loop query, any idea why?

  • RE: best way to delete two million rows

    thanks guys!!! i apreciate it. 🙂

  • RE: best way to delete two million rows

    ok... so this is the query i have to run first to delete the 2 million rows out of the 20

    ALTER INDEX IX_Messages_1 ON tblMessages DISABLE

    GO

    DElete *

    from tblMessages

    where

    datecreated>=...

  • RE: best way to delete two million rows

    hi my plan is to run this script once, delete 2 million rows out of 20 million, then create another query to do it every 3 minutes. so then...

  • RE: missing quotes?

    i have sorry i should had put the whole code

    SET NOCOUNT ON

    DECLARE @TABLENAME VARCHAR(255)

    select @TABLENAME='customers_'+ CONVERT(CHAR(4),YEAR(GETDATE()) -1)

    SET IDENTITY_INSERT '+ @TABLENAME + ' ON

    INSERT INTO '+ @TABLENAME'

    i tried...

  • RE: help with SP

    the name of the table will change according to the date the record was created. I have a table for each year. what the sp does is that...

  • RE: help with SP

    yes, i am going to run this every night.

  • RE: help with SP

    thanks i tried your advice and i get the print so you are right i need to add ' ' but when i do it goes back to

    WHERE TYPE...

  • RE: help with SP

    thank you so much, i did your changes but now i get these errors:

    ALTER PROC uspArchiveOldData

    AS

    BEGIN

    SET NOCOUNT ON

    DECLARE @SWITCHDB VARCHAR(255) , @ARCHIVEDB VARCHAR(255), @TABLENAME VARCHAR(255)

    SELECT @SWITCHDB ='DBDistributors' ,

    @ARCHIVEDB='DBDistributors_Archive',

    @TABLENAME='DistributorsTable_'+...

  • RE: display sizes of tables in a DB

    wow thank you!

  • RE: display sizes of tables in a DB

    thank you!!! it worked, i ran the script in the forum. 🙂

Viewing 15 posts - 361 through 375 (of 382 total)