Viewing 15 posts - 21,691 through 21,705 (of 22,184 total)
You got it? Cool. It's a neat little trick that I learned from a Microsoft Consultant. It's good to see other people find it useful too.
October 4, 2007 at 12:00 pm
Yeah. I put it that way in case, like us, you have a compound PK.
October 4, 2007 at 9:47 am
I'd stay away from table valued functions unless performance is completely not a concern.
The cross apply should only return a single value such that you'd get more than one row,...
October 4, 2007 at 9:17 am
Hmmm. Not an easy one. I looked through the code, I generated the query. Everything looks ok, assuming the data types in the tables are as presented, with one possible...
October 4, 2007 at 9:00 am
Sounds like a problem inside the code of the stored procedure. Can you post it?
Assuming a straight SELECT query, at no point should there be a conversion from anything to...
October 4, 2007 at 8:17 am
Oh, OK. Well it sounds similar to a problem we have
SELECT ...
FROM p
CROSS APPLY (SELECT TOP 1 ...
...
October 4, 2007 at 8:06 am
Wouldn't the EndDate be a "+" 1 to make it a day larger than the EffectiveDate?
Also, I think that you may want to use the DATEADD() function because MS is...
October 4, 2007 at 7:01 am
SELECT TOP 1 *
FROM X
ORDER BY Something (ASC/DESC)
The ASC (ascending) will get you the first record, the DESC (descending) will get you the last record. Just remember that TOP processes...
October 4, 2007 at 6:56 am
If you've got an existing system, monitor it to see what, if anything, is behaving badly. Start from there. Once you've identified the issues, you can start to make decisions...
October 4, 2007 at 6:52 am
I agree with what everyone has written and, since I didn't see it, I'll add one more thing. The reason you have to be so picky about the clustered index...
October 4, 2007 at 6:49 am
You can't do that, but there is a filter tool in the Object Explorer and in Object Explorer Details window that will allow you to look at subsets of the...
October 4, 2007 at 6:44 am
Stupid question, I know, but is it possible that the SET NOCOUNT ON is, you know, off inside these queries? Depending on how you make the call, I've seen rows...
October 4, 2007 at 6:41 am
OK. I take it all back. I've done some more research in preparation for the tests I was going to run. The Ninja is right. It's a myth.
This is from...
October 4, 2007 at 5:53 am
One key difference, ignoring the "myth" for the moment, is that the constraint can be used as part of a foriegn key if you choose while the index can't.
Now,...
October 4, 2007 at 5:37 am
Viewing 15 posts - 21,691 through 21,705 (of 22,184 total)