Viewing 15 posts - 1,006 through 1,020 (of 1,473 total)
Bob Hovious (12/3/2008)
When I first needed to drop time, the first solution I ever came up with was cast(left(dateCol,11) as datetime) :w00t:
Using LEFT! UGH! THE HORROR!...
December 3, 2008 at 2:54 pm
If you have the correct privileges, you can use Profiler to watch exactly what it's doing.
Open up a trace, add Events such as SP:StmtCompleted and filter by an SPID. ...
December 3, 2008 at 2:31 pm
Whether there is any need for the transaction depends on the query. You may be able to re-write the query so that you don't need the transaction, or you...
December 3, 2008 at 2:17 pm
Is this the same primary key violation you've already posted like 3 other times that we keep telling you you can't do?
December 3, 2008 at 2:06 pm
Bob:
Read this the other day on Gail's blog, think you may find it interesting. I used to do this the same way you do. Not anymore!
http://sqlinthewild.co.za/index.php/2008/09/04/comparing-date-truncations/
Thanks Gail.
December 3, 2008 at 2:03 pm
Ok. As we've said, you cannot be sure that your index will be used unless you give it an index hint (Some people will argue you can't even be...
December 2, 2008 at 11:58 am
To make sure we're all on the same page, please post the exact code that generated that screenshot. (The table/index definitions as they currently stand, and the updates targetting...
December 2, 2008 at 11:07 am
Don't create the non-clustered index at all. Shouldn't be necessary.
WITH (INDEX(0))
Since the clustered index is the only one, that will grab it correctly. While this may...
December 2, 2008 at 10:21 am
You have to make your clustered index the order that you want the table updated in. Make what you currently have your non-clustered index into your primary key /...
December 2, 2008 at 9:30 am
Concept:
Write your query to link the original table grouped by item # to a derived table with a sum of all items. Divide the sum of the parent query...
December 2, 2008 at 6:41 am
Barry: You can, I do it all the time when applying this method.
Gardenlady: Your index specification looks correct... unfortunately you're specifying the WRONG index :cool:. You need...
December 2, 2008 at 6:34 am
A couple quick thoughts. (I admittedly skimmed this)
1. You're not using an index hint. While it's not always necessary, it's always good practice. Add WITH (INDEX(0))...
December 1, 2008 at 2:07 pm
How about something like:
UPDATE pa SET
pa.UnMergeDate = GETDATE(),
pa.MergeDate = NULL,
pa.AppraiserComment = CASE WHEN h.AppraiserChangeType =...
December 1, 2008 at 1:32 pm
JMK (11/28/2008)
Thanks... funny thing, in spelling out the logic I was attempting to do, a light bulb went off on where I may have missed a step and...
November 28, 2008 at 1:06 pm
Please refer to the article in my signature for how to post the table structure / sample data in an easily usable format.
Also, please post the definition of the view.
It...
November 28, 2008 at 10:01 am
Viewing 15 posts - 1,006 through 1,020 (of 1,473 total)