Oracle syntax with variables

I use INTO alot in PL/SQL... Which works fine
        Select Title INTO vTitle
        FROM TAL_MAIN
        INNER JOIN TAL_PAYGROUPS b ON A.PAYGROUP_ID = B.PAYGROUP_ID
        INNER JOIN OMNI_ENT_PARAGRAPH c ON A.JOBDESC_ID=C.PARA_ID
        WHERE a.TALENT_ID = 42;    

I want to know if I could possibly do this for multiple variables. I need to get these values from a Select statement
        Select Title INTO vTitle, Department into vDept, Position into nPosition
        FROM TAL_MAIN
        INNER JOIN TAL_PAYGROUPS b ON A.PAYGROUP_ID = B.PAYGROUP_ID
        INNER JOIN OMNI_ENT_PARAGRAPH c ON A.JOBDESC_ID=C.PARA_ID
        WHERE a.TALENT_ID = 42;    

Any help would be appreciated
Thanks
-JK
jknj72Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexander Eßer [Alex140181]Software DeveloperCommented:
that should read:

Select Title, Department, Position INTO vTitle, vDept, nPosition
        FROM TAL_MAIN
        INNER JOIN TAL_PAYGROUPS b ON A.PAYGROUP_ID = B.PAYGROUP_ID
        INNER JOIN OMNI_ENT_PARAGRAPH c ON A.JOBDESC_ID=C.PARA_ID
        WHERE a.TALENT_ID = 42;   

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jknj72Author Commented:
I still get a 'Missing Keyword' error with vTitle highlighted?
0
Alexander Eßer [Alex140181]Software DeveloperCommented:
Did you declare these variables: vTitle, vDept, nPosition?!
0
jknj72Author Commented:
Haha, sorry I was passing them in but now Im trying to do it this way and forgot. You got it
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.