If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Monthname function problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-01-06, 22:04
pohnpohnpohn pohnpohnpohn is offline
Registered User
 
Join Date: Aug 2006
Posts: 3
DB2 Monthname function problem

I tried to test 'MONTHNAME' function using

db2 "SELECT MONTHNAME( '2006-01-02' ) FROM SYSIBM.SYSDUMMY1"

then the error message showed:

SQL0443N Routine "SYSFUN.MONTHNAME" (specific name "MONTHNAME3") has returned an error SQLSTATE with diagnostic text "SYSFUN:03". SQLSTATE=38552

Does anyone know what's wrong with my command?
thx in advance
PoHN

Last edited by pohnpohnpohn; 08-02-06 at 01:58.
Reply With Quote
  #2 (permalink)  
Old 08-02-06, 01:04
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
the error is because of : Arithmetic overflow or underflow
why you are using long_varchar??

either use simply varchar or
db2 values(monthname('2006-08-08'))

Rahul Singh
Reply With Quote
  #3 (permalink)  
Old 08-02-06, 02:00
pohnpohnpohn pohnpohnpohn is offline
Registered User
 
Join Date: Aug 2006
Posts: 3
oh.. sorry i posted the worng command i used monthname('2006-01-02')

i've just tried db2 "values(monthname('2006-08-08'))" but it still didn't work.
it still shows the same error..
Reply With Quote
  #4 (permalink)  
Old 08-02-06, 02:21
guyprzytula guyprzytula is offline
Registered User
 
Join Date: Jun 2006
Posts: 471
sysfun

whenever I have problems with sysfun functions I try
db2updv8 -d xxxx
db2 bind /sqllib/bnd/db2schema.bnd grant public blocking all
in 99,99% of these case, the problem is resolved.
__________________
Best Regards, Guy Przytula
DB2 UDB LUW certified V6/7/8
Reply With Quote
  #5 (permalink)  
Old 08-02-06, 02:55
pohnpohnpohn pohnpohnpohn is offline
Registered User
 
Join Date: Aug 2006
Posts: 3
it still doesn't work...
is it because of my environment problem?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On