Viewing 15 posts - 1,561 through 1,575 (of 2,469 total)
I'll just be spectator and wait for Jesper's impressive insights.....but wanted to throw something in that I read yesterday in the great Ken Henderson's...
August 1, 2005 at 8:51 am
huh - this is a "neither here nor there" comment - just yesterday when I was browing through the ssc articles I read one by Brian that addressed the same...
August 1, 2005 at 7:49 am
okay Anjali - I think this should do it...I tested with top 2 (since I'd inserted a limited # of rows)....
select a.empid, a.empname as manager, b.empname as employee
from employee a
inner...
July 31, 2005 at 10:52 pm
I'm not functioning too well at this late hour...remi will be along soon to do the rest of this...
create table Employee
(EmpID int,
EmpName VarChar(50),
ReportTo int)
Insert...
July 31, 2005 at 10:41 pm
afterthought addendum...
but then again not knowing what permissions issues are involved for disabling/enabling the trigger...maybe you are better off putting everything inside a stored procedure...!!!!!
July 31, 2005 at 8:04 pm
Christopher - here's another workaround if you want to consider this....
if you want the trigger to be fired only when the stored procedure deletes from the table, then you can...
July 31, 2005 at 7:07 pm
ilan - it would really help if you post the ddls of your tables and your end goal...given what there is, this is what it appears you want...
SELECT * FROM...
July 31, 2005 at 7:01 pm
ilan - I'm not very clear on your question...
however, you can count the number of rows with a given ProductName by doing a :
select count(*) from Products where ProductName =...
July 31, 2005 at 2:13 pm
...but cursors are there and available to be used so I wouldn't throw them out. Just my 2 cents and everyone has their own opinion......
yes indeed Bo...they're not being thrown...
July 31, 2005 at 2:06 pm
Speaking from personal experience - I've been asked stuff like how familiar I am with basic select, insert, updates.....when I would use stored procedures - if I have used cursors...
July 31, 2005 at 2:00 pm
Christopher - I don't have time to test this but see if this is what you want...
CREATE PROCEDURE DeleteOrder
@OrderID int
AS
IF EXISTS(SELECT * FROM OrderDetails WHERE OrderID = @OrderID AND DispatchedDate...
July 31, 2005 at 1:43 pm
Prashant - the best place to look up EVERYTHING - not just stored procedures - is BOL (Books on line)!!!
July 31, 2005 at 12:00 pm
Bo - Cursors are a big "NO NO" on this site (& should be everywhere else) - the idea is to be efficient and get all the rows in one...
July 31, 2005 at 11:36 am
forget what I said about the flag..don't know what I was talking about...
just post the ddls & what you want to do!
July 31, 2005 at 11:27 am
Christopher - another workaround that I can think of is to use a flag in your OrderDetails table - something that will indicate whether the rows have been deleted via...
July 31, 2005 at 10:59 am
Viewing 15 posts - 1,561 through 1,575 (of 2,469 total)