Viewing 15 posts - 361 through 375 (of 382 total)
thank you all!!! i apreciate it!!! 😀
March 10, 2008 at 11:03 am
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...
March 10, 2008 at 10:58 am
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...
March 10, 2008 at 9:59 am
yes i am so sorry i am working on a sql server 2000, so then how would i just get the top 100?
March 10, 2008 at 9:43 am
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?
March 10, 2008 at 9:36 am
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>=...
March 10, 2008 at 8:03 am
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...
March 10, 2008 at 7:30 am
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...
March 7, 2008 at 12:14 pm
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...
March 7, 2008 at 6:42 am
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...
March 6, 2008 at 12:12 pm
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_'+...
March 6, 2008 at 7:37 am
thank you!!! it worked, i ran the script in the forum. 🙂
February 28, 2008 at 1:08 pm
Viewing 15 posts - 361 through 375 (of 382 total)