Spool appending using NEW_VALUE

Posted on 2013-09-16
Medium Priority
Last Modified: 2013-09-16
I'm trying to use NEW_VALUE within a script in Oracle. Run from Red Hat Linux
I need the log generated is: create_table_tags_ddmmyyyyhh24miss.log

clear scr
set serveroutput on
set verify off
set echo off
set feedback off
set trimspool on
column tm new_value file_time
select to_char(sysdate,DDMMYYYYHH24MISS') tm from dual;
prompt &file_time
spo &&path./create_table_tags_&file_time..log

  v_create VARCHAR2 (10000); 


/* my code */


Open in new window

But when I run I see the errors:

SQL*Plus: Release Production on Mon Sep 16 15:15:36 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Release - 64bit Production
With the Automatic Storage Management option
ORA-01756: quoted string not properly terminated
Enter value for file_time:
SP2-0546: User requested Interrupt or EOF detected.
Enter value for file_time:
SP2-0546: User requested Interrupt or EOF detected.

SQL> Disconnected from Oracle Database 11g Release - 64bit Production

Open in new window

Could you help me to find the error, please?

Thanks in advanced!
Question by:carlino70
LVL 78

Accepted Solution

slightwv (䄆 Netminder) earned 2000 total points
ID: 39496563
First error you are missing a single quote:
select to_char(sysdate,'DDMMYYYYHH24MISS') tm from dual;

See if that fixes the other issues.

Author Closing Comment

ID: 39496629
Thanks, and apologies for this omission.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question