09. January 2007

SQL Process For Marriage

ALTER PROCEDURE MyMarriage
@ BrideGroom Char(NotBad),
@ Bride Char(Good)
AS
BEGIN
SELECT distinct BrideGroom FROM US_Bridegrooms
WHERE
US_Status_ BrideGroom in ( ‘Citizen’ ,’Green_Card’) AND
US_Status_FatherInLaw = null AND
US_Status_MotherInLaw = null AND
BrideGroom = ‘Millionaire’ AND
FatherInLaw = ‘Millionaire’ AND
HouseCount _US > 2 AND
HouseCount _INDIA > 2 AND
House_Location_India in (’Chennai’,'Mumbai’,'Bangalore’,'Delhi’,'Hyderabad’) AND
House_Location_USA in (’MA’,'VA’,'WA’,'IL’,'NJ’,'NY’,'CA’) AND

HouseStatus _US =’TwoStoreyed’ AND
HouseStatus _INDIA =’TwoStoreyed’ AND
CarCount _US > 2 AND
CarCount _INDIA > 2 AND
BridegroomEduStatus in (’MS’,'PHD’) AND Mother_in_Law_EduStatus=null AND
HavingBrothers=’NO’ AND
HavingSisters =’ No’ AND
AllowRelocate_US_to_INDIA =’NO’
END
GO

/*After Marriage*/
UPDATE Husband_Lookup SET Husband_Type = ‘H P’
insert into MyBankAccout (
SELECT Gold ,Cash,House,Car,BankBalance FROM FatherInLaw
union all SELECT Gold ,Cash, House ,Car,BankBalance FROM Husband )

UPDATE MyBankAccout SET MyBal = MyBal + FatherinLawBal
UPDATE MyLocker SET MyLockerContents = MyLockerContents + FatherinLawGold

INSERT INTO MyCarShed VALUES (’BMW’,'Mercedes’,'Ferrari’)

..
Then the wife writes the below query:
TRUNCATE HUSBAND
TRUNCATE FatherInLaw

TRUNCATE MotherInLaw

Related Posts you may like to Read...


  • For love marriage Please contact ….
  • Wife’s Secret
  • What is love and marriage
  • sardar and maths..
  • Interesting comments…

  • one Comment

    MyAvatars 0.2

    1. Jack From UNITED KINGDOM (UNITED KINGDOM) Wrote Using Internet Explorer Internet Explorer 6.0 on Windows Windows XP on 15. February 2008 at 10:51 pm

    Hi

    There’s a syntax error on the first chunk of code

    Post Comment

    The following tags are permitted: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>