I would like to spool a SQL result to a file. But, I want the file to change depending on what the user enters at a prompt. The problem I am having is that now I want part of my file name to be built depending on what the user enters.
For example, I want the file name to contain a year and...
One thing that I noticed is that you are declaring s_id as a varchar2 with a length of only 32. You are then trying to build s_id as something a lot bigger than 32 characters.