#1  
Old 12th May 2008, 11:24 AM
Gerard Hook
 
Posts: n/a
Default Ordinal value of a character

Hi!

I have the following questions in relation to my SQL UDF development:

1. Is SUBSTRING(<StringValue> Index FOR Length) the only way of referring
to indexed characters within a string?
2. Is there a way of returning the ordinal value of a character in SQL.
ie. 75 for character 'K', 13 for carriage return etc.?
3. CHAR, VARCHAR, CLOB, NCHAR? Where do I get more info about these types
so I can decide which is best suited to my UDF variables and return values?

Thanks in advance, Gerard Hook


  #2  
Old 12th May 2008, 01:44 PM
William O.
 
Posts: n/a
Default Re: Ordinal value of a character

Hi Gerard,

"Gerard Hook" <gerard@handon.com.au> wrote in message news:48278f30@nexus-vkpb9bih5.Nexus.local...
> Hi!
>
> I have the following questions in relation to my SQL UDF development:
>
> 1. Is SUBSTRING(<StringValue> Index FOR Length) the only way of referring
> to indexed characters within a string?


Section 5.7.3 of the online SQL reference guide details available string handling functions...though it doesn't show the POSITION
function, which may be in section 5.7.2.

> 2. Is there a way of returning the ordinal value of a character in SQL.
> ie. 75 for character 'K', 13 for carriage return etc.?


ORD('<char') returns an integer value. 'A' => 65 and what not.

> 3. CHAR, VARCHAR, CLOB, NCHAR? Where do I get more info about these types
> so I can decide which is best suited to my UDF variables and return values?


The SQL reference guide. There's an online version available too:
http://www.nexusdb.com/onlinemanualv2/full/index.html
You can download the CHMs from the website too.

Regards,
William.




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incorrect fixed-length character string values Ole Willy Tuv nexusdb.public.support.sql 2 22nd December 2006 05:16 AM
Access 97 - character scrambling Kris nexusdb.public.support.odbc 3 26th December 2003 10:42 AM


All times are GMT +11. The time now is 10:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.