On Friday, August 19, 2016 at 6:53:35 PM UTC-3, Bruno Almeida wrote:
Hello friends,
DB2 10.1 LUW
I'm trying to understand this scenario:
$ db2 "create table TEST ( C1 date) "
DB20000I The SQL command completed successfully.
$ db2 "values current date"
1
----------
08/19/2016
1 record(s) selected.
$ db2 "insert into TEST values current date"
DB20000I The SQL command completed successfully.
$ db2 "select * from TEST"
C1
----------
08/19/2016
1 record(s) selected.
Hummm, OK!
Now look ...
$ db2 "insert into TEST values ('08/20/2016')"
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0181N The string representation of a datetime value is out of range. SQLSTATE=22007
$ db2 "insert into TEST values ('20/08/2016')"
DB20000I The SQL command completed successfully.
$ db2 "select * from TEST"
C1
----------
08/19/2016
08/20/2016
2 record(s) selected.
db2inst1@renata-molinaro:~$ db2 get db cfg | grep -i territory
Database territory = US
Would you help me with this issue?
Regards,
Bruno.
Hi Chuck,
I tried to change the insert date format in my DB2 10.1, but the behavior is the same:
$ db2 bind @db2ubind.lst datetime USA blocking all grant public
LINE MESSAGES FOR db2ubind.lst
------ --------------------------------------------------------------------
SQL0061W The binder is in progress.
LINE MESSAGES FOR db2clpnc.bnd
------ --------------------------------------------------------------------
SQL0595W Isolation level "NC" has been escalated to "UR".
SQLSTATE=01526
LINE MESSAGES FOR db2arxnc.bnd
------ --------------------------------------------------------------------
SQL0595W Isolation level "NC" has been escalated to "UR".
SQLSTATE=01526
LINE MESSAGES FOR db2ats_sps.bnd
------ --------------------------------------------------------------------
1173 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1203 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1234 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1482 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1499 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1517 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1555 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1679 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1696 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1715 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1732 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1895 SQL0204N "SYSTOOLS.ADMINTASKSTATUS" is an undefined name.
SQLSTATE=01532
1950 SQL0204N "SYSTOOLS.ADMINTASKSTATUS" is an undefined name.
SQLSTATE=01532
1962 SQL0204N "SYSTOOLS.ADMINTASKS" is an undefined name.
SQLSTATE=01532
1979 SQL0204N "SYSTOOLS.ADMINTASKSTATUS" is an undefined name.
SQLSTATE=01532
LINE MESSAGES FOR db2_adminotm.bnd
------ --------------------------------------------------------------------
346 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
375 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
459 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
540 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
574 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
594 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
675 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
771 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
908 SQL0204N "SYSTOOLS.ADMIN_MOVE_TABLE" is an undefined name.
SQLSTATE=01532
LINE MESSAGES FOR db2ubind.lst
------ --------------------------------------------------------------------
SQL0091N Binding was ended with "0" errors and "26"
warnings.
$ db2 "insert into TEST values ('08/20/2016')"
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0181N The string representation of a datetime value is out of range. SQLSTATE=22007
Any ideas?
Regards,
Bruno.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)