[Oracle][ODBC][Ora]ORA-01460: Nicht implementierte oder sinnlose Umwandlung gefordert , error code 1460, State: 37000.When doing an insert,update there is no problem. I have found he following in V$SQL:
[24]> (exec-command *con* (concatenate 'string "create or replace procedure b99 (x integer) as begin null;" (string (code-char 32)) " end;"))
NIL
[25]> (exec-command *con* (concatenate 'string "create or replace procedure b99 (x integer) as begin null;" (string (code-char 13)) " end;"))
WARNING:
[Oracle][ODBC][Ora]Trigger, procedure or function created with PL/SQL compilation error(s)., error code 24344, State: S1000.
NIL
[26]> (exec-command *con* (concatenate 'string "create or replace procedure b99 (x integer) as begin null;" (string (code-char 10)) " end;"))
NIL
[27]> (exec-query *con* (concatenate 'string "select " (string (code-char 13)) " * from dual"))
(("X")) ;
("DUMMY")
I can not make Oracle return unicode. I am using a 9.2 DB I have created a nchar column which is a unicode datatype for 9.2.
I am using the oracle driver. There is a workaround tab where one can force the driver to
return string data as SQL_WCHAR.
Storing unicode strings with parameters of type :unicode-string inserts some dummy character (a '?' standing on its head). Selecting nchr(1000) returns the same charcater.
Only selecting from NLS_SESSION_PARAMETERS returns a 16bit charcater.
Or do I have this problem since NLS_CHARACTERSET=WE8ISO8859P15?
*** - [Microsoft][ODBC driver for Oracle][Oracle], error code 0, State: NA000.Visual Studio 6.0 has the same problem. Is 9.2 supported by Microsoft ODBC-Driver?
create or replace package test99_pkg as
type refcursor is ref cursor;
procedure test_cursor(v varchar2,c in out refcursor);
end;
create or replace package body test99_pkg as
procedure test_cursor(v varchar2,c in out refcursor) is
begin
open c for select v as a,'1234567890' as b from dual;
end;
end;
The cursor can be retrieved with following lisp code:
(with-prepared-statement (stm con
"{call test99_pkg.test_cursor(?,?)}"
'((:string :in )))
(let ((str "just a string"))
(exec-prepared-query stm (list str))))
Note that the cursor parameter must be declared in/out. If a parameter ist supplied for the cursor parameter, it still works. This needs more investigations.
mysql> create view bla as select date_add('2007-8-1',interval 1 day) as a;
Query OK, 0 rows affected (0.01 sec)
mysql> desc bla
-> ;
+-------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| a | varbinary(29) | YES | | NULL | |
+-------+---------------+------+-----+---------+-------+
1 row in set (0.00 sec)
how to do it right:
mysql> create view bla2 as select date_add(cast('2007-8-1' as datetime),interval 1 day) as a;
Query OK, 0 rows affected (0.00 sec)
mysql> desc bla2;
+-------+----------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| a | datetime | YES | | NULL | |
+-------+----------+------+-----+---------+-------+
1 row in set (0.00 sec)
Be carefull with variables, declared with something like set @a =1. The types are automatically determined, and a type for dates does not exist.
Of course error handling in MySQL is not existent, maybe I should change the server settings:
mysql> select cast(cast('12345678901' as decimal) as char) as a, cast(cast('1234567890' as decimal) as char) as b;
+------------+------------+
| a | b |
+------------+------------+
| 9999999999 | 1234567890 |
+------------+------------+
1 row in set, 1 warning (0.00 sec)
So there is no overflow error.
Division by zero is handled, but only for an insert:
mysql> set @a=1; Query OK, 0 rows affected (0.00 sec) mysql> set @b=0; Query OK, 0 rows affected (0.00 sec) mysql> select @a/@b; +-------+ | @a/@b | +-------+ | NULL | +-------+ 1 row in set, 1 warning (0.00 sec) mysql> insert into blu select @a/@b; ERROR 1365 (22012): Division by 0