-
decode query
hi guys
hope everyone will be fine.
I am facing a problem in using decode query function. actually i have three fields in my table
FieldA VARCHAR
FieldB VARCHAR
FeildC Long
now in Fielda if there is '+' then Field C should be shown. I am writing query like this.
select FieldA, decode(FieldA,'+',FieldC) from abc
i am getting this error
"ORA-00997: Illegal use of LONG datatype"
is it means that decode can't be used with the LONG datatype.
please help
-
you need to write a function that will convert long to varchar2 so that you can select it. this link should give you a headstart
http://asktom.oracle.com/pls/ask/f?p...D:839298816582
-
Originally Posted by graham_o
well thanks
I use CASE in the query & it solved my problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|