oracle - Specifying the return type of SQL case statement -


i have following sql case statement.

select tracking_num, case     when source_one not null source_one     else source_two end source_value ... 

source_one , source_two double precision. if execute above sql source_value column returned of int precision.

a coworker suggested adding ohd_ beginning of column name.

select tracking_num, case     when source_one not null source_one     else source_two end ohd_source_value ... 

this returns correct value (the returned column named 'source_value').

is ohd_ prefix oracle standard? cannot find documentation anywhere. also, there better way perform conversion? perhaps using cast keyword?

thank in advanced response.

db version: oracle database 11g enterprise edition release 11.2.0.3.0 - 64bit

edit: followup ohd_ prefix mentioned. turns out baked our client work around oracle bug #1312311. ohd stands "oracle hack double" apparently.

your circumstance doesn't seem right.

oracle not, without coded intervention, converting types based solely on column alias.

however, of returned type can cast selected value in select statement.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -