loiclacombe / dbdeploy

Automatically exported from code.google.com/p/dbdeploy
0 stars 0 forks source link

Failed to apply change script to create oracle function #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a change script which create an oracle function

   CREATE OR REPLACE FUNCTION TIME_DIFF
     (P_WHAT IN VARCHAR2, P_D1 IN DATE, P_D2 IN DATE)
     RETURN NUMBER AS L_RESULT NUMBER; 
   BEGIN
     SELECT (P_D2-P_D1) * DECODE(UPPER(P_WHAT), 'SS', 24*60*60, 'MI', 24*60, 'HH', 24, NULL);
     RETURN L_RESULT;
   END;
   /

2. Specified the delimiter in the build.xml

    delimitertype="row"  
    delimiter="/"
    lineending="lf"

What is the expected output? What do you see instead?

[sql] Executing resource: \dbdeploy-3.0M3\mydeployment\all-deltas.sql
[sql] Failed to execute:  BEGIN SELECT (P_D2-P_D1) * DECODE(UPPER(P_WHAT), 
'SS', 24*60*60, 'MI', 24*60, 'HH', 24, NULL)

BUILD FAILED
java.sql.SQLException: ORA-06550: line 1, column 94:
PL/SQL: ORA-00923: FROM keyword not found where expected
ORA-06550: line 1, column 7:
PL/SQL: SQL Statement ignored
ORA-06550: line 1, column 93:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the 
following: ;

What version of the product are you using? On what operating system?
dbdeploy Milestone-Release3.0M3 in MS Windows 7 64-bit 

Please provide any additional information below.

I got an error which suppose had been fixed in Issue-43.

I examined the generated delta script and found that every lines were delimited 
by a LF.

Original issue reported on code.google.com by raphael...@gmail.com on 23 Dec 2011 at 8:36