Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decode statement using isnull

Status
Not open for further replies.

jaburke

Programmer
May 20, 2002
156
US
Hey,
I am trying to use a decode statement. I want to say if the date is null then return a space else return the value. This is what I am doing.

decode(fieldA,IsNull,' ',fieldA)

I am getting an oracle error on the isnull (invalid column name). What is wrong with my syntax? I have never used decode, so I am trying to figure it out. :)

Thanks a bunch!
 
For oracle

Code:
decode(fielda,null,'',fielda)

Couple of Questions? Where are you using the decode?Normally, with a decode you assign some value. Why are you inserting ''? What are you trying to accomplish in Crystal? You can set up formulas to handle nulls.

It would also help if you specify what version of Crystal you are using along with some sample input and output.
 
That does work - I figured it out right after I posted.

I am using the decode in a business objects universe, not in crystal. If there are nulls returned in a BO webi report and the report is exported to excel then the field has #EMPTY in it and our users hate it. So, that is what I am doing. Thanks for the reply.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top