Viewing 15 posts - 18,616 through 18,630 (of 26,489 total)
LOOKUP_BI-756009 (10/26/2009)
Matt : Yes I knew that I had to include 'Use databasename , go , and then the Select statment but was not too sure how to do...
October 26, 2009 at 1:51 pm
I would write the code more like this:
DECLARE @RowsUpdated int;
SET ROWCOUNT 4000000;
WHILE 1 = 1
BEGIN
UPDATE t1
SET Qty = t2.Qty
...
October 26, 2009 at 1:48 pm
Krasavita (10/26/2009)
WHILE 1 = 1
BEGIN
UPDATE t1
SET Qty = t2.Qty
FROM dbo.Table1 t1
INNER JOIN dbo.Table2 t2 ON t1.KU = t2.KU
WHERE t1.Qty IS NULL;
IF @@ROWCOUNT < 4000000 BREAK;
END;
Why are you...
October 26, 2009 at 1:44 pm
Slight change to my original code, might be nice to know if the growth is a precentage or not.
select
db.name as DBName,
mf.name as...
October 26, 2009 at 1:07 pm
Matt Wilhoite (10/26/2009)
I knew there was a table I was missing. I couldn't think of the master_files table to save my life.Thank you Lynn 😀
Well, I can't take...
October 26, 2009 at 12:58 pm
You don't need the dynamic sql in the cursor solution if you change the the table from sys.sysfiles to sys.sysaltfiles.
But I'd look at the code I provided above.
October 26, 2009 at 12:57 pm
Give this code a try:
select
db.name as DBName,
mf.name as DBFileName,
mf.growth as Growth
from
sys.databases db
...
October 26, 2009 at 12:54 pm
Change this:
set @DbGrowth =(select top 1 cast((growth) as varchar(30)) from sys.sysfiles)
to this:
set @DbGrowth =(select top 1 cast((growth) as varchar(30)) from sys.sysfiles where name = @DbName)
Please note, this is untested. ...
October 26, 2009 at 12:49 pm
Jack, I know what that is like. Your family will be in our prayers.
October 23, 2009 at 7:02 pm
sqlservercentral.w.micmurphys (10/23/2009)
October 23, 2009 at 11:07 am
I do find that quite sexist. I happen to work with a group of female developers and they work quite while and do their research. I have also...
October 18, 2009 at 5:51 pm
Betty and I bought Proud Mom and Dad sweat jackets Thursday and were wearing them today coming back from the grocery store. We were coming up in the elevator...
October 17, 2009 at 4:59 pm
One of her fellow soldiers was sitting next a lady who at the end of the flight handed her (not Kassondra) a note that said "thanks for serving" along with...
October 17, 2009 at 4:31 pm
Well, the graduation ceremony was great. We got to spend quite a bit of time with Kassondra Thursday and Friday, but it was a bit difficult saying goodbye again...
October 17, 2009 at 4:21 pm
Viewing 15 posts - 18,616 through 18,630 (of 26,489 total)