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!

quoted string not properly terminated

875438Jan 18 2012 — edited Jan 18 2012
Hi,

I am getting the error "ORA-01756: quoted string not properly terminated", on running the below script. Kindly help
set feedback off;
set define off;
set serveroutput on;
declare v_sql varchar2(4000);
v_cnt number(1);
begin 
  select count(1) into v_cnt
  from user_tables t
  where lower(t.table_name) =lower('C2P_ETL_BATCH_CONFIG'); 
  if v_cnt = 1 then 
    dbms_output.put_line (' Table C2P_ETL_BATCH_CONFIG exists');
  else
    v_sql:= 'create table C2P_ETL_BATCH_CONFIG
(
  ETL_BATCH_CONFIG_ID NUMBER(8) not null,
  ETL_BATCH_CONFIG    VARCHAR2(50),
  ETL_BATCH_FILE      VARCHAR2(150),
  ETL_BATCH_SEQ       NUMBER(2) default 1 not null,
  B_DISABLE           NUMBER(1) default 0 not null,
  FILE_PARAMETERS     VARCHAR2(250) default ''
)';
   execute immediate v_sql;

v_sql:= 'alter table C2P_ETL_BATCH_CONFIG
            add primary key (ETL_BATCH_CONFIG_ID)';
    execute immediate v_sql;

dbms_output.put_line (' Created table C2P_ETL_BATCH_CONFIG');   
  end if;
end;  
/
This post has been answered by dbthought on Jan 18 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2012
Added on Jan 18 2012
4 comments
897 views