Viewing 11 posts - 15,361 through 15,371 (of 15,371 total)
Be VERY careful if you use Instead of triggers. I worked for client that put lots of business logic in a Instead of Insert trigger. We encountered an issue when...
April 10, 2009 at 7:36 am
A few years ago I worked as a consultant for a large firm that did all their development in house. The enterprise application was massive. It spanned 3 separate databases...
April 10, 2009 at 7:20 am
Aggregate columns get no column name unless you alias it. Do something like this:
Select SocialSecurityNumber, ClearedDate, [Type], DDS, Count(*) as TotalCleared
April 9, 2009 at 1:42 pm
Start with your original code.
Remove the TotalCleared column from your temp table.
instead of :
declare @cnt int
select @cnt=count(*) from #temp
update #temp set TotalCleared = @cnt
select * from...
April 9, 2009 at 11:54 am
Oh I see what you did. You should put all the inserts back to the original. The only change should be at the end.
select @cnt=count(*) from...
April 9, 2009 at 11:40 am
Can you post the new code? I tested the code i put it up and it works fine. 😉
April 9, 2009 at 11:28 am
You could try simply dropping the TotalCleared from #temp. It is not needed. The update you are doing to that column will always contain just the rowcount. I assume you...
April 9, 2009 at 10:42 am
Bill Coale (3/13/2008)
nextrow.PriceStartDate AS EndDate
I usually do:
dateadd(day, -1, nextrow.PriceStartDate) AS EndDate
Also truncate to midnight the start/end date and any date comparisons...
January 23, 2009 at 7:50 am
Tao Klerks (11/18/2008)
I think you're confusing a couple of possibilities.
The query above reports employees who have no "subordinates" - there are no employees that have their employeeid in the...
November 18, 2008 at 9:13 am
That provides another reason why the following syntax is (in my opinion) preferable:
left join employees as...
November 18, 2008 at 8:41 am
I fell victim to a similair script at one point. :Whistling: As a result I now make it my standard habit that after the declaration of the sp i wrap...
November 14, 2008 at 7:23 am