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 > Function ASCII() on DB2 Mvs v7

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-06, 03:32
aubignac aubignac is offline
Registered User
 
Join Date: Jun 2006
Posts: 2
Function ASCII() on DB2 Mvs v7

Hi,

I'm using the function ASCII() on oracle database to convert a char on its ascii corresponding number. I want to use a similar function on DB2 but I can't arrive to find something equivalent.
Can someone help me?

Thank's
Christophe
Reply With Quote
  #2 (permalink)  
Old 06-15-06, 23:17
Nageswaran Nageswaran is offline
Registered User
 
Join Date: Jul 2002
Posts: 48
Try this
db2 "select ascii('c') from sysibm.sysdummy1"
Reply With Quote
  #3 (permalink)  
Old 06-16-06, 03:14
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
Quote:
Originally Posted by Nageswaran
Try this
db2 "select ascii('c') from sysibm.sysdummy1"

this function becomes available in DB2 V8 NFM

there is no equivalent function in DB2 V7. ( not even in DB2 V8 CM )
Reply With Quote
  #4 (permalink)  
Old 06-16-06, 04:35
aubignac aubignac is offline
Registered User
 
Join Date: Jun 2006
Posts: 2
OK, thank you very much. I'll wait the upgrade of our system in few months...

(Nageswaran, I've tried your example, but DB2 replied :"SQL0440N No function by the name "ASCII " having compatible arguments was
found in the function path. SQLSTATE=42884")

Bye
Christophe
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