Viewing 15 posts - 361 through 375 (of 508 total)
Normally when I see a problem with invalid column name in a #Temp table, there will be a table with the same name already created in the same session. ...
July 30, 2010 at 11:29 am
Your problem is that you are using the transactional data as the left side of the query (the anchor).
What you need is to have a constant set of data on...
July 26, 2010 at 12:09 pm
Before going down the path of insisting that your IO subsystem is inadequate you should be very, very sure that the cause of excessive IO is not poorly optimized queries....
July 19, 2010 at 10:38 am
This will give you what you want. The OUTER APPLY will out perform the row number solution if there are many calls per customer and there is an index...
July 6, 2010 at 12:41 pm
iklektic,
Your post is very similar to a post from a few weeks ago that I used in an article that I submitted and has been approved for publication here on...
June 23, 2010 at 3:53 pm
The posted replies are very good. I especially use Gail Shaw's articles and I've found them very useful.
But even before I go digging into performance issues that I haven't...
June 18, 2010 at 10:32 am
You won't be able to index a view on this, but I can tell you that using an APPLY with a top 1 can be very fast. Here's an...
June 17, 2010 at 12:33 pm
You probably also want to check for fragmentation on your clustered index. SQL Server will first try to store the LOB (your ntext column) in the data pages. ...
June 17, 2010 at 12:13 pm
Since you are doing this in a stored procedure anyhow, you can load the data into a temp table first. The stored procedure makes the decision on which table...
June 16, 2010 at 1:14 pm
If you have them defined as Foreign Key constraints then this query should point you in the right direction:
SELECT object_id, OBJECT_NAME(object_id)
, parent_object_id, OBJECT_NAME(parent_object_id)
, referenced_object_id, OBJECT_NAME(referenced_object_id)
FROM sys.foreign_keys
WHERE parent_object_id = referenced_object_id
Todd Fifield
June 16, 2010 at 12:59 pm
I completely agree with Jeff on this one. Divide and conquer techniques should be part of any T-SQL curriculum. I do it all the time in stored procedures...
June 15, 2010 at 2:52 pm
Matt,
This was quite a while ago and I don't have the actual code I used at hand. Basically you divide the radius (in miles) you want by 111 (carried...
November 1, 2009 at 2:04 pm
I had to do something like this before SQL 2005 so CTE wasn't available. It was in a stored procedure where I'd get a zip code and number of miles...
October 30, 2009 at 11:34 am
I work a lot with an application where virtually every column in every table is a user defined data type. In stored procedures using temp tables, I can't use...
October 30, 2009 at 10:59 am
Jeff,
I'm awaiting that article. It would be nice to have something that looks pretty to resolve these arguments I get into.
Todd Fifield
June 22, 2009 at 11:42 am
Viewing 15 posts - 361 through 375 (of 508 total)