Can't seem to set variables in BASH function?

I’m working on the periodic database lesson on the relational database course. In one of my functions I query my database to get all the info that is required to output. I keep getting errors indicating my variables are blank? I tried running it outside the function in it’s own .sh and it works. Any ideas? Feel like I’m loosing my mind!

Thanks in advance

Edit = fixed the screen shot

OK well I figured out I somehow got got a space in my variable? I added this bit to get rid of it.

SYMBOL2=$(echo $SYMBOL | sed ‘s/ //’)
echo “I’m off to get info!” .$SYMBOL2.