Just can't figure it out...

Description

There are times when Student come to card office informing the workers that their card didn’t work in the bus and the driver asked them to check with the card office. At the card office, the workers then check if the student’s Metro Bus ride eligibility is active or not.

YOUR TASK: Create a procedure that will take card number as an input and check if that card number is active or not (card status set to YES for active card and NO for inactive/bad listed card)

HINT: Use table Valid_Cards

Instruction to test the code:

STEP 1: Execute the procedure with the following command: (Replace <proc_name> with the name you gave to the procedure)

EXEC <proc_name> '52227001000001'

OUTPUT

It should display BAD LISTED