title: How to resolve SP2-0734 in SQL Plus using CONCAT?
body: <p>I have created a script that generates this error, but it still executes perfectly. What can I do to resolve this error? I have tried some of the common fixes like SET SQLBLANKLINES ON and it didn't work.</p>
  
  <p>The error: SP2-0734: unknown command beginning "CONCAT('IN..." - rest of line ignored.</p>
  
  <p>This is the part of the script that generates the error:</p>
  
  <pre><code>PROMPT 'ENTER THE PERCENTAGE YOU WISH TO INCREASE THE PRICE BY: '
  ACCEPT V_PCT_INCREASE NUMBER
  PROMPT
  PROMPT 'ENTER THE PRODUCT SEARCH CRITERIA: '
  ACCEPT V_PRODUCT_DESC
  PROMPT
  PROMPT 'YOU HAVE CHOSEN TO UPDATE PRODUCTS WHOSE DESCRIPTION BEGINS WITH &amp;V_PRODUCT_DESC WITH A PERCENTAGE INCREASE OF &amp;V_PCT_INCREASE PERCENT.'
  PROMPT
  SET TERMOUT OFF;
  SET VERIFY OFF;
  SET SQLBLANKLINES ON;
  SPOOL c:\runscripts\insert_prices.sql;
  SELECT CONCAT('INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)
      VALUES (', P.PRODUCT_ID||', '''||PR.START_DATE||''', '||PR.LIST_PRICE * (1+(&amp;V_PCT_INCREASE/100))||', '||PR.MIN_PRICE * (1+(&amp;V_PCT_INCREASE/100))||', CURRENT_DATE'||');')
  FROM TAR_PROD P
  JOIN TAR_PRICE PR
  ON P.PRODUCT_ID = PR.PRODUCT_ID
  WHERE UPPER(P.DESCRIPTION) LIKE UPPER('&amp;V_PRODUCT_DESC%');
  SPOOL OFF;
  SET FEEDBACK ON;
  SET TERMOUT ON;
  PROMPT 'A SCRIPT insert_prices.sql HAS BEEN CREATED AT c:\runscripts\insert_prices.sql'
  PROMPT
  PROMPT 'THE FOLLOWING PRODUCTS WERE ADDED TO THE INSERT SCRIPT WITH THE ADJUSTED PRICES: '
  SELECT P.PRODUCT_ID, P.DESCRIPTION, PR.LIST_PRICE, PR.MIN_PRICE,
  PR.LIST_PRICE * (1+(&amp;V_PCT_INCREASE/100)) AS "ADJ_LIST_PRICE", 
  PR.MIN_PRICE * (1+(&amp;V_PCT_INCREASE/100)) AS "ADJ_MIN_PRICE"
  FROM TAR_PROD P
  JOIN TAR_PRICE PR
  ON P.PRODUCT_ID = PR.PRODUCT_ID
  WHERE UPPER(P.DESCRIPTION) LIKE UPPER('&amp;V_PRODUCT_DESC%');
  @C:\runscripts\insert_prices.sql
  PROMPT 'INSERT SCRIPT IS COMPLETE.'
  PROMPT 'SEE BELOW FOR RESULT VALIDATION.'
  SELECT *
  FROM TAR_TEMP_PRICE;
  ROLLBACK;
  </code></pre>
  
  <p>It still works, but I would like the suppress the error.</p>
  
  <p>The insert statements generated by the code above:</p>
  
  <pre><code>CONCAT('INSERTINTOTAR_TEMP_PRICE(PRODUCT_ID,START_DATE,LIST_PRICE,MIN_PRICE,END_DATE)VALUES(',P.PRODUCT_ID||','''||PR.START_DATE||''','||PR.LIST_PRICE
  ------------------------------------------------------------------------------------------------------------------------------------------------------
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100860, '01-JUN-90', 39.2, 31.36, CURRENT_DATE);                                                                                             
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100860, '01-JAN-90', 35.84, 28.672, CURRENT_DATE);                                                                                           
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100860, '01-JAN-89', 33.6, 26.88, CURRENT_DATE);                                                                                             
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100861, '01-JUN-90', 50.4, 40.32, CURRENT_DATE);                                                                                             
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100861, '01-JAN-90', 47.04, 37.632, CURRENT_DATE);                                                                                           
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100861, '01-JAN-89', 43.68, 34.944, CURRENT_DATE);                                                                                           
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100870, '01-JAN-90', 3.136, 2.688, CURRENT_DATE);                                                                                            
  
  INSERT INTO TAR_TEMP_PRICE (PRODUCT_ID, START_DATE, LIST_PRICE, MIN_PRICE, END_DATE)                                                                  
      VALUES (100870, '01-JAN-89', 2.688, 2.128, CURRENT_DATE); 
  </code></pre>
  
  <p>For some reason it is adding part of the select statement from the code above.</p>
  
  <p>Here is the output:</p>
  
  <pre><code>'ENTER THE PERCENTAGE YOU WISH TO INCREASE THE PRICE BY: '
  12
  
  'ENTER THE PRODUCT SEARCH CRITERIA: '
  DYN
  
  'YOU HAVE CHOSEN TO UPDATE PRODUCTS WHOSE DESCRIPTION BEGINS WITH DYN WITH A PERCENTAGE INCREASE OF      12 PERCENT.'
  
  'A SCRIPT insert_prices.sql HAS BEEN CREATED AT c:\runscripts\insert_prices.sql'
  
  'THE FOLLOWING PRODUCTS WERE ADDED TO THE INSERT SCRIPT WITH THE ADJUSTED PRICES: '
  
  PRODUCT_ID DESCRIPTION                        LIST_PRICE      MIN_PRICE ADJ_LIST_PRICE  ADJ_MIN_PRICE
  ---------- ------------------------------ -------------- -------------- -------------- --------------
      100860 DynaBlaster 400                        $35.00         $28.00         $39.20         $31.36
      100860 DynaBlaster 400                        $32.00         $25.60         $35.84         $28.67
      100860 DynaBlaster 400                        $30.00         $24.00         $33.60         $26.88
      100861 Dynablaster 600                        $45.00         $36.00         $50.40         $40.32
      100861 Dynablaster 600                        $42.00         $33.60         $47.04         $37.63
      100861 Dynablaster 600                        $39.00         $31.20         $43.68         $34.94
      100870 Dynablaster xl60                        $2.80          $2.40          $3.14          $2.69
      100870 Dynablaster xl60                        $2.40          $1.90          $2.69          $2.13
  
  8 rows selected.
  
  SP2-0734: unknown command beginning "CONCAT('IN..." - rest of line ignored.
  </code></pre>