Viewing 15 posts - 1 through 15 (of 19 total)
Username may be sufficient for the original authors problem, but for mine it really isn't. I often can't guarantee that I have anything that is uniquely identifiable that I...
January 14, 2009 at 8:02 am
RBarryYoung said
A much better way is to use the OUTPUT clause,like this:
...
INSERT into InsertIDTst(ColName, object_id)
Output INSERTED.ID Into @IDList(ID)
Select name, object_id
From sys.columns
...
When I first found out about...
January 14, 2009 at 6:36 am
Do INSERTs really help? They just have a tendency to fill up tables with data.
Even though table variables do not have any statistics or indexes, I have found that...
October 29, 2008 at 7:54 am
The wierd thing is that the where clause is on a table that only has 170+- rows in it.
It seems that the problem is coming in when it joins that...
October 29, 2008 at 7:35 am
It is easy to get confused with Boolean logic. An easy way to visualize what is going on is to create a table (spreadsheet) of your data. ...
October 27, 2008 at 6:54 am
I don't see the need for a cursor at all here. I don't know enough about your tables, and I also don't know where you added your extra conditions,...
October 23, 2008 at 6:20 am
Assuming that you had a tally table, you could do it like this. This allows you to easily make your range of years anything you want it to be.
SELECT...
October 22, 2008 at 6:41 am
My take on this is that it is inappropriate for any front-end to build your WHERE clause for you. A procedure can easily be written to take a parameter...
October 15, 2008 at 6:09 am
That may be a simple function, but you have just killed your performance. If your table has 1000 rows in it, that function (and the select inside of it)...
October 10, 2008 at 6:06 am
I haven't look in detail at what your dynamic queries are doing, but by looking at the bottom of your proc I believe that you could easily convert this to...
October 9, 2008 at 6:37 am
I have found that sometimes it helps performance to break up a problem into smaller, easier to solve, sub-problems. Also, nested SELECTs that reference the outer SELECT can cause...
September 25, 2008 at 6:42 am
Given that you are trying to "retrieve multiple points of 'survey data' to the application in a single row", that sounds to me like you are pivoting the data. ...
September 19, 2008 at 6:03 am
Ever since I found out about how to do Running Totals (a couple of years ago), that has been my Hammer for so many things. I haven't yet had...
September 17, 2008 at 10:33 am
In INNER_MOST_LOOP I believe your OR clause is going to cause you trouble. I don't think it is
going to do what you are thinking it is. I have...
September 16, 2008 at 3:32 pm
I Believe this will do what you are wanting to do. It makes use of the Running Total (or whatever it is called) pattern to identify the proper suffix...
September 16, 2008 at 6:29 am
Viewing 15 posts - 1 through 15 (of 19 total)