Viewing 15 posts - 3,766 through 3,780 (of 5,685 total)
GilaMonster (3/9/2011)
March 9, 2011 at 10:03 am
Captain Proc, they've hit us in the injectors...
(In my best William Shatner:)
"DYYYYYYYyyyyyynaaaaaamiiiiiicc!!!!!"
March 8, 2011 at 4:51 pm
Khades (3/8/2011)
Doesn't a trigger have the same performance of a Stored Procedure though?
Coded properly, yes. I find it to be a hidden process, however, and I'd have to look...
March 8, 2011 at 3:27 pm
Bryan.avergonzado (3/8/2011)
March 8, 2011 at 3:10 pm
Well, you can work with all the deleted records at once in a trigger, and you should. Can you post your trigger code? Maybe we can help you...
March 8, 2011 at 3:09 pm
Hey Bryan, welcome to SSC.
First, your immediate question... the only thing of interest in what you posted is this, and there's no way we will have any idea if applicable...
March 8, 2011 at 3:06 pm
CTE's are only good for the immediately following statement, which in this case is the SELECT for the @loaddate.
Might I recommend a view in this case?
March 8, 2011 at 3:02 pm
Khades (3/8/2011)
I need to insert rows into error table. Error table has an identity column...
March 8, 2011 at 2:55 pm
LOL, he loves you forever? 😉 Or am I expecting a few bodies?
Btw, this: (SELECT Max(DTStart) AS DTStart FROM Batch WHERE TreaterID = B.TreaterID)
I would recommend dropping to...
March 8, 2011 at 2:48 pm
GilaMonster (3/8/2011)
March 8, 2011 at 2:43 pm
kd11 (3/8/2011)
The logic work but I had to change "-30" to "-60" to get within the last 30 days, I wondere why?
:blink:
CloseDate between GETDATE() -30 and GETDATE() should get...
March 8, 2011 at 2:37 pm
Jim Rathmann (3/8/2011)
SELECT *
FROM employee INNER JOIN department
...
March 8, 2011 at 2:35 pm
kadeshara (3/8/2011)
I've hardly had any experience with CTE's before but I am learning thanks to helpful people like yourself and few good examples/articles on the internet. Thanks for pointing...
March 8, 2011 at 1:51 pm
Check the link in my sig under 'Tally Tables' for a good use of Cross Joins.
All of the 'odd' joins have their places, just should be used rarely and with...
March 8, 2011 at 12:17 pm
Note, when you changed the grouping, you didn't change all of it:
, MaxClose AS
(SELECT JobNumber, JobSubject, MAX( JobClose) AS MaxClose
FROM #MyTable
GROUP BY JobNumber, JobSubject
)
and change this:
...
March 8, 2011 at 10:16 am
Viewing 15 posts - 3,766 through 3,780 (of 5,685 total)