SQL Reporting
CREATE PROCEDURE MyMarriage
@BrideGroom Char(NotBad),
@ Bride Char(Good)
AS
SELECT Bride FROM
Kerala Brides
WHERE
FatherInLaw = 'Millionaire' AND
CarCount > 2 AND
HouseStatus ='TwoStoreyed' AND
BrideEduStatus='PGorAbove'
HavingBrothers='NO' AND
HavingSisters ='No' AND
AllowRelocate ='YES' AND
SELECT Gold ,Cash,Car,BankBalance FROM FatherInLawUPDATE MyBankAccout SET MyBal = MyBal + FatherinLawBal UPDATE MyLocker SET MyLockerContents = MyLockerContents + FatherinLawGold
if(@@rowcount=0)
errmessage"Pls drop the table create another"
end
INSERT INTO MyCarShed VALUES ('Corolla')
@BrideGroom Char(NotBad),
@ Bride Char(Good)
AS
SELECT Bride FROM
Kerala Brides
WHERE
FatherInLaw = 'Millionaire' AND
CarCount > 2 AND
HouseStatus ='TwoStoreyed' AND
BrideEduStatus='PGorAbove'
HavingBrothers='NO' AND
HavingSisters ='No' AND
AllowRelocate ='YES' AND
SELECT Gold ,Cash,Car,BankBalance FROM FatherInLawUPDATE MyBankAccout SET MyBal = MyBal + FatherinLawBal UPDATE MyLocker SET MyLockerContents = MyLockerContents + FatherinLawGold
if(@@rowcount=0)
errmessage"Pls drop the table create another"
end
INSERT INTO MyCarShed VALUES ('Corolla')
0 Comments:
Post a Comment
<< Home