title: Error "from keyword not found where expected" when executing a stored procedure oracle
body: <p>I have the following store procedure i am getting an error "from keyword not found where expected" . Is there any issue with paramater p_usr_tz usage in the select query ?</p>
  
  <p>I have set p_usr_tz  to 'Europe/London' and p_wi_id to 48127808 </p>
  
  <pre><code>PROCEDURE getworkitembyid (p_wi_id IN NUMBER,p_usr_tz IN VARCHAR2
      , workitem OUT prvdr_rec  )
     AS
     BEGIN
        OPEN workitem FOR
           SELECT wi.id wi_id
                , wi.type_name
                , wi.status
                , wi.priority
                , wi.crt_usr_id
                , crt_usr.name crt_name
                , crt_usr.pass crt_pass
                , crt_usr.first_name crt_first_name
                , crt_usr.last_name crt_last_name
                , crt_usr.email crt_email
                , from_tz (cast ( (wi.crt_tm) as timestamp), 'America/New_York') at time zone p_usr_tz crt_tm
                , wi.updt_usr_id
                , updt_usr.name updt_name
                , updt_usr.pass updt_pass
                , updt_usr.first_name updt_first_name
                , updt_usr.last_name updt_last_name
                , updt_usr.email updt_email
                , from_tz (cast ( (wi.updt_tm) as timestamp), 'America/New_York') at time zone p_usr_tz updt_tm
                , wi.lock_usr_id
                , lock_usr.name lock_name
                , lock_usr.pass lock_pass
                , lock_usr.first_name lock_first_name
                , lock_usr.last_name lock_last_name
                , lock_usr.email lock_email
                , wi.lock_tm
                , queue.id queue_id
                , queue.name
                , queue.TYPE
                , queue_wi.state
                , queue_wi.queue_entry_tm
             FROM wi
                  INNER JOIN sec_usr crt_usr
                     ON wi.crt_usr_id = crt_usr.id
                  INNER JOIN sec_usr updt_usr
                     ON wi.updt_usr_id = updt_usr.id
                  LEFT OUTER JOIN sec_usr lock_usr
                     ON wi.lock_usr_id = lock_usr.id
                  LEFT OUTER JOIN queue_wi
                     ON wi.id = queue_wi.wi_id
                  LEFT OUTER JOIN queue
                     ON queue_wi.queue_id = queue.id
            WHERE wi.id = p_wi_id;
     END getworkitembyid;
  </code></pre>