PL SQL

  • Hi can any 1 write me a simple sp that will do the following

    ATM Machine process

    in sp it will accept debit card number & password then according to it, it will retrive your current balance from the DB table & show u the output of the current balance then it will ask u that you want to withdraw money if yes then you will enter the ammount of money & it will show u your updated new balance on the screen & also it will update the new balance in the DB table.

    Then again ask you do u want to withdraw if yes then same procedure if not then exit & print thank u for the transaction.

    PLEASE ANY 1 CAN HELP ME ITS MY ASSIGNMENT

    THANKS

  • Thanks for been honest about it being homework.

    Show us what you've done so far and what problems you are having and someone will help.

    We don't do homework assignments for people, as it defeats the purpose of homework.

    Do you want this for SQL Server (ie T-SQL) or for Oracle (PL-SQL)?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Well its not the homework assignment its from my MANAGER for skill development yes u can say office homework 🙂

    i will be really happy to have the help....

    & it does not matter wether its in SQL server or Oracle any of it will be helpfull the main thing is to learn.

    so far this is wat i have learned & wrote.

    SET SERVER OUTPUT ON

    Declare

    atmcardno Number;

    currentbalance Number;

    Begin

    Select (Balance DB Columnname) into currentbalance from (DB Tablename) Where (atmcardno DB columnname) = atmcardno;

    DBMS_OUTPUT_LINE ('THE CURRENT BALANCE IS '|| currentbalance);

    END

    now the problem is that my manager said the datatypes selected are not appropriate also after showing the current balance it should as for withdrawl from the user if user selects yes then the user will enter the the amount he want to withdraw then it will update the current balance with the new balance & again ask user that he want to make other transaction if no then finish he also asked to put exception handling so this is my scenario if u can help i will be more then delighted

    SO PLEASE ANY 1 HELP ME OUT SO I CAN LEARN 🙂 :blush:

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply