Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SP2-0734: unknown command beginning ",

927867Oct 22 2012 — edited Oct 22 2012
Hi guys,

Im trying to run my script on sqlplus and im getting this error SP2-0734: unknown command beginning ", Im not sure what it means but if I will run my script in oracle sql developer software, it worked fine. However, I need it to run on sqlplus mode to prevent server timeout.
SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF 

spool /home/oracle/scriptfolder_output.txt


select material_util.getFolderNameAtLevel((select min(mf.nf_folderid) 
                                             from materialfolder 
                                           where nfx_link = m.material_id 
                                              and nf_materialtypeid = m.material_type_id),1043587,1043562,2) "L1"
      , material_util.getFolderNameAtLevel((select min(mf.nf_folderid) 
                                             from materialfolder 
                                            where nfx_link = m.material_id 
                                             and nf_materialtypeid = m.material_type_id),1043587,1043562,3) "L2"
      , material_util.getFolderNameAtLevel((select min(mf.nf_folderid) 
                                             from materialfolder 
                                            where nfx_link = m.material_id 
                                              and nf_materialtypeid = m.material_type_id),1043587,1043562,4) "L3"
      , material_util.getFolderNameAtLevel((select min(mf.nf_folderid) 
                                             from materialfolder 
                                           where nfx_link = m.material_id 
                                            and nf_materialtypeid = m.material_type_id),1043587,1043562,5) "L4"
      , (select count(*)
         from log_material_copy
         where material_id = lmc.material_id
         and material_type_id = lmc.material_type_id
         and destination_unit_id in (select nf_unitid
                           from unit_groups
                           where nf_groupid = 97))  "Germany"
      
      , (select count(*)
         from log_material_copy
         where material_id = lmc.material_id
         and material_type_id = lmc.material_type_id
         and destination_unit_id in (select nf_unitid
                           from unit_groups
                           where nf_groupid = 31))  "Sweden"
         
      , m.material_id
      , m.material_type_id
       
      from material m, materialfolder mf, userinfo ui, unit_groups ug, log_material_copy lmc
      where m.owner_user_id = ui.ip_userid
      and ui.nf_unitid = ug.nf_unitid
      and m.material_id = mf.nfx_link
      and m.material_type_id = mf.nf_materialtypeid 
      and m.material_id = lmc.material_id
      and m.material_type_id = lmc.material_type_id
      and to_char(lmc.log_date, 'YYYYMM') in ('201209')      
      and m.MATERIAL_TYPE_ID <> 8  
      and mf.nf_folderid in (select nfp_folderid
                              from folderunit
                              where nfp_folderid in (
                            select ip_folderid
                              from folder 
                             start with ip_folderid in (40736, 40761, 40918, 40920)
                            connect by nf_parentfolderid = prior ip_folderid
                               and ip_folderid != prior ip_folderid))
      and ug.nf_groupid = 343;

spool off

exit
This is the error i got in sqlplus. By the way, im using putty.
SQL> @/home/oracle/script/hqfolder.sql
SP2-0734: unknown command beginning &quot;, (select ...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;from log_m...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;where mate...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and materi...&quot; - rest of line ignored.
<br>
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
<br>
SP2-0734: unknown command beginning &quot;and destin...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;from unit_...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;where nf_g...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;, m.materi...&quot; - rest of line ignored.
<br>
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
<br>
SP2-0734: unknown command beginning &quot;, m.materi...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;from mater...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;where m.ow...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and ui.nf_...&quot; - rest of line ignored.
<br>
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
<br>
SP2-0734: unknown command beginning &quot;and m.mate...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and m.mate...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and m.mate...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and m.mate...&quot; - rest of line ignored.
<br>
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
<br>
SP2-0734: unknown command beginning &quot;and to_cha...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and m.MATE...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;and mf.nf_...&quot; - rest of line ignored.
<br>
SP2-0734: unknown command beginning &quot;from folde...&quot; - rest of line ignored.
<br>
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
<br>
SP2-0734: unknown command beginning &quot;where nfp_...&quot; - rest of line ignored.
<br>
<pre>
                               and ip_folderid != prior ip_folderid))
                                                                   *
</pre>
ERROR at line 5:
<br>
ORA-00933: SQL command not properly ended
<br>
Thank you and have a great day

Regards,
J
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2012
Added on Oct 22 2012
6 comments
170,841 views