Viewing 15 posts - 12,781 through 12,795 (of 14,953 total)
smunson (7/16/2008)
The reason I wasn't all that worried about performance is because this kind of fixing is generally a one-time event, and even if it took an hour, the overall...
July 16, 2008 at 10:31 am
smunson (7/16/2008)
July 16, 2008 at 9:31 am
Here's why I suggested what I did, with taking larger chunks first, then smaller.
create table #T (
String1 varchar(1000),
String2 varchar(1000),
String3 varchar(1000))
insert into #t(string1)
select 'A' + replicate(' ', (abs(checksum(newid()))%100)+1)
+ 'B' + replicate('...
July 16, 2008 at 9:23 am
Yes, we understand what you're trying to do. Unpivot and Avg will do what you need.
July 16, 2008 at 9:02 am
Break the calculations up.
Something like this might do it:
;with
Portions ([Type], Weight) as
/*
Replace this CTE with a table in the real app.
This is for proof of concept only.
These numbers...
July 16, 2008 at 8:09 am
You index a uniqueID column the same way you index any other column.
If it's the PK, it's indexed. The question is whether or not it should be the clustered...
July 16, 2008 at 7:54 am
You might need to set up some sort of table partitioning. If you had today's data in one partition and older data in another (or others), the indexes on...
July 16, 2008 at 7:50 am
You can use Unpivot (check it out in Books Online) to turn the row into a column, then use Where to dump 0 and null, then use Avg to average...
July 16, 2008 at 7:45 am
umailedit (7/16/2008)
It seems primitive to require locks for any read operation. In Oracle I think readers don't lock/block anything.
Somehow I doubt that Oracle defaults to dirty reads, so what...
July 16, 2008 at 7:36 am
Daryl, that one won't work if you have DateFirst or Language settings that don't make Sunday = 1 in the week. Too common and too easy to change to...
July 15, 2008 at 3:45 pm
You'll need something like this:
select [Name]
from dbo.Actor
inner join dbo.Casting
on Actor.ID = Casting.ActorID
inner join dbo.Movie
on Casting.MovieID = Movie.ID
where Title = 'Alien'
That won't sort the actors. You'll need an Order By...
July 15, 2008 at 3:19 pm
There isn't. You'll have to either create your own way, or upgrade to a higher license of SQL Server, or buy something that does this.
July 15, 2008 at 3:15 pm
I had something like this happen on one server. Found out that the e-mail address had been stored in the Operators data as "[email:myaddress@mycompany.com]" (names changed to protect something...
July 15, 2008 at 3:14 pm
You're going to be querying from a join between the tables. You say, "3 databases", does that mean these are in separate databases, or are they separate tables in...
July 15, 2008 at 3:08 pm
Viewing 15 posts - 12,781 through 12,795 (of 14,953 total)