Unanswered: Wrapping a select statement in pl/sql procedure
Hello, Im new to pl/sql
I am trying to wrap a pl/sql procedure around this sql select statement so I get the same output, but so I can supply the some of the where parameters as variables:
SELECT go.sequence, ft.version, ft.released_title, ft.final_duration
FROM FinishedTrack ft, GroupedOn go, Album a
WHERE ft.originates_from = go.originates_from
AND go.album_id = a.album_id
AND a.is_distributed_as = 'c'
AND a.title = 'My Feet'
ORDER BY go.sequence;
I have this so far, but I have erors I cannot fix And I still need to get it to display the output aswell.
CREATE OR REPLACE PROCEDURE list_track
INTO v_sequence, v_version, v_released_title, v_final_duration
FROM FinishedTrack, GroupedOn, Album
WHERE FinishedTrack.originates_from = GroupedOn.originates_from
AND GroupedOn.album_id = Album.album_id
AND Album.is_distributed_as = 'c'
AND Album.title = 'My Feet'
I would be extremly grateful with any help. Im not sure about having multiple coloumns and tables in the select into statements in procedures.