Skip to content

Commit 5f344c0

Browse files
committed
2.1.7 - Fixed problem with conditional compilation.
1 parent ff46839 commit 5f344c0

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
`METHOD4` 2.1.6
1+
`METHOD4` 2.1.7
22
============
33

44
Method4 is a PL/SQL application to run dynamic SQL in SQL.

method4_dynamic_ot.tpb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ CREATE OR REPLACE TYPE BODY method4_dynamic_ot AS
8181
--If the length is more than 30 the query will generate the error
8282
--"ORA-00902: invalid datatype" without a line number.
8383
--I'm not sure why or where it breaks, but this fixes it.
84-
$IF DBMS_DB_VERSION.ver_le_10 or DBMS_DB_VERSION.ver_le_11 or DBMS_DB_VERSION.ver_le_12_1 $THEN
84+
$IF DBMS_DB_VERSION.ver_le_10 $THEN
85+
substr(r_sql.description(i).col_name, 1, 30),
86+
$ELSIF DBMS_DB_VERSION.ver_le_11 $THEN
87+
substr(r_sql.description(i).col_name, 1, 30),
88+
$ELSIF DBMS_DB_VERSION.ver_le_12_1 $THEN
8589
substr(r_sql.description(i).col_name, 1, 30),
8690
--In 12.2 the same logic applies, but for 128 bytes instead of 30.
8791
$ELSE

method4_ot.tpb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ CREATE OR REPLACE TYPE BODY method4_ot AS
3333
--If the length is more than 30 the query will generate the error
3434
--"ORA-00902: invalid datatype" without a line number.
3535
--I'm not sure why or where it breaks, but this fixes it.
36-
$IF DBMS_DB_VERSION.ver_le_10 or DBMS_DB_VERSION.ver_le_11 or DBMS_DB_VERSION.ver_le_12_1 $THEN
36+
$IF DBMS_DB_VERSION.ver_le_10 $THEN
37+
substr(r_sql.description(i).col_name, 1, 30),
38+
$ELSIF DBMS_DB_VERSION.ver_le_11 $THEN
39+
substr(r_sql.description(i).col_name, 1, 30),
40+
$ELSIF DBMS_DB_VERSION.ver_le_12_1 $THEN
3741
substr(r_sql.description(i).col_name, 1, 30),
3842
--In 12.2 the same logic applies, but for 128 bytes instead of 30.
3943
$ELSE

0 commit comments

Comments
 (0)