View previous topic :: View next topic
|
Author |
Message |
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
While unloading records from table, i want to type cast the float values to char.
this i am doing in this way
select r1 , r2 , r3 , char(r4) , r5 , char(r6)
from table
with ur;
where consider r4 and r6 as float fileds, that i am type casting it to char.
note: all these fields are nullable.
But in the result i am not getting null indicators for r4 and r6.
Pls give me solution. or suggest other ways of type casting in select query. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Was there some reason to post the same question in 2 forums?
I'll delete one if you'll let me know which one you'd like to keep. . . |
|
Back to top |
|
|
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
Sorry for that, i wrongly posted it in Pl/ASSEMBLER forum, i wanted to post in DB2 forum, So i repeated it in DB2. So you can go a head and delete the query posted in PL/ASSEMBLER forum. and also please do help me. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Not to worry - i've deleted the "other" one
Is there a reason to type cast in the select? If you process the select with them as float, do you see the null indicator? If you see the null for the float values, possibly you could deal with them inside the code after the select. |
|
Back to top |
|
|
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
yes if i give without typecast, the null indicators are coming.so as you said i am selecting without typecast and handling them in coboldb2 program.
thank you for your help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|