From: Norbert Munkel on
Hi,

I am facing a little bit of trouble when trying to run the following
statement on some AIX-Instances (All DB2-Versions from 8.2 up to 9.5):

db2 "select max(to_date(end_time,'YYYYMMDDHH24MISS')) from
table(admin_list_hist()) as histlist"

I am getting the following error:

SQL0171N The data type, length or value of argument "2" of routine
"SYSIBM.TO_DATE" is incorrect. SQLSTATE=42815


The same statement on Linux returns the right value:

db2 "select max(to_date(end_time,'YYYYMMDDHH24MISS')) from
table(admin_list_hist()) as histlist"

1
--------------------------
2010-03-15-23.10.44.000000

1 record(s) selected.

What´s wrong with the format string (which should be "argument 2" in
this case)?

Any hints are welcome!

cu,

Norbert