Elton1984
Programmer
- Mar 8, 2004
- 16
Hiz all,
Reallie in need of some help here..
My stored procedure onli update the last record of the DB.
DECLARE @prdtID varchar(10)
SELECT @prdtID = a.PrdtCode FROM tblPrdt a LEFT OUTER JOIN tblLoan b ON a.PrdtCode = b.PrdtCode WHERE (b.LoanIndex IS NULL)
UPDATE tblPrdt
SET PrdtStatus = 'On Loan'
WHERE PrdtCode = @prdtID
I know that i am needed to input a loop somewhere in my codes but i seriously have no idea of where and how to do it.. Ermz anyone haf any ideas?
Thanx in advance
Elton Wong
Reallie in need of some help here..
My stored procedure onli update the last record of the DB.
DECLARE @prdtID varchar(10)
SELECT @prdtID = a.PrdtCode FROM tblPrdt a LEFT OUTER JOIN tblLoan b ON a.PrdtCode = b.PrdtCode WHERE (b.LoanIndex IS NULL)
UPDATE tblPrdt
SET PrdtStatus = 'On Loan'
WHERE PrdtCode = @prdtID
I know that i am needed to input a loop somewhere in my codes but i seriously have no idea of where and how to do it.. Ermz anyone haf any ideas?
Thanx in advance
Elton Wong