Viewing 15 posts - 121 through 135 (of 508 total)
This is a good example of whey it isn't a good idea to do any sort of linked server activities inside a trigger. It would be easier to maintain...
August 31, 2011 at 1:58 pm
Francis,
I've worked with a POS (Point Of Sale) system that uses text stored in tables for use in Dynamic SQL. It's mostly for appending to the WHERE clause (filtering)...
August 31, 2011 at 1:36 pm
sam-1083699 (8/29/2011)
and the reason i created non-clustered...
August 31, 2011 at 1:06 pm
Hans,
Are you sure the index hasn't been disabled? Since the query is a TOP 1, it really should have used the index for a seek, even if there aren't...
August 31, 2011 at 12:32 pm
ChrisM@Work (8/23/2011)
August 24, 2011 at 11:36 am
Christi,
Another big addition is error handling. Be sure to look up TRY/CATCH blocks. I use them religiously.
Todd Fifield
August 22, 2011 at 11:39 am
Here is an example of using a calendar table as the 'Anchor' to the query. This particular example uses a day type table and the days when nothing happened...
August 22, 2011 at 11:27 am
Joe90-646727 (2/19/2008)
this seems like it should be simple, but is a little frustrating!
I have an sp which takes a list of keys like "12,13,14,15,16" as a varchar param.
I would...
August 22, 2011 at 10:11 am
Ninja's_RGR'us (8/19/2011)
ChrisM@Work (8/19/2011)
Ninja's_RGR'us (8/19/2011)
Quite easy with a calendar table.Select top 1 * FROM dbo.Calendar WHERE Y = 2011 AND DW = <whatever fits your setting> ORDER BY dt.
Just as easy...
August 19, 2011 at 12:27 pm
Just to add my 2 cents. I've found that identity columns for both clustering key and primary key to be very, very fast when doing complex queries, and as...
August 19, 2011 at 11:44 am
nageshp,
This is not really a strange case at all. I've seen it sometimes where the left table will only have rows that correspond to the right table. This...
August 15, 2011 at 11:22 am
Ninja's_RGR'us (8/12/2011)
August 12, 2011 at 7:14 pm
Bruce W Cassidy (8/11/2011)
Hmm, I'd never thought of using a CROSS APPLY in that fashion. Good thinking there!
Bruce,
If you think about it, ROW_NUMBER() probably has to touch each row...
August 12, 2011 at 12:09 pm
Sometimes I find that using a CROSS APPLY works out better than row numbering performance wise.
Here's your code with a CROSS APPLY to the ManualHubodometerReading instead of a JOIN:
select
at.AssetID,
at.CustomerIdentifier as...
August 10, 2011 at 3:11 pm
I'm a fan of SubVersion (aka tortoise SVN) for source control. It makes versioning very easy. I have most of my clients also set up with SubVersion. ...
August 10, 2011 at 2:49 pm
Viewing 15 posts - 121 through 135 (of 508 total)