Casting single letter as char(1) [message #351080] |
Mon, 29 September 2008 04:10 |
|
didiera
Messages: 134 Registered: August 2007 Location: Mauritius
|
Senior Member |
|
|
Hello again,
I wanted to know if it were possible for me to retrieve a single letter from a varchar field into a char field of lenght 1. I have been around and tried CASTing and though in PL/SQL it's ok, it doesn't compile in forms 6i stating that expression is of wrong type the code actually looks like this :
select nvl(my_char_field,cast(substr(my_varchar_field,1,1) as char)) from my_table;
By the way what this query seeks to achieve is to replace the eventual missing values from my_char_field by the first character of my_varchar_field... but type casting screws up; maybe because it's Forms 6i?
regards,
DIdz
|
|
|
|
|
|
|
|
|