By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,502 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,502 IT Pros & Developers. It's quick & easy.

Oracle reports v 6 (&crm ebusiness)--sql query, of using decode

P: n/a
Hiyas

I am currently working on Oracle Report which ties in with my a report
in the ebusiness suite of Oracle telesales module.

Basically, the address on statement reports have blank fields (null)
where the customer does not have and address2, address 3,

At present its set up to read customers
ADDRESS1
CITY
COUNTY
POSTAL CODE

But if the customer does have an address 2 or 3 fields I can do this
by adding in ADDRESS2 AND ADDRESS3 to both my SQL Query and report.
However, not all addresses have 2nd & 3rd Address fields, hence all
the other statments will appear as 'null fields' making the address
for some customers gappy?

I want to write a DECODE statement whereby, if ADDRESS2 AND ADDRESS3
are NULL to skip to the next field being 'CITY'?

Please help...

Cheers
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"etravels" <em******@yahoo.co.uk> wrote in message
news:d1**************************@posting.google.c om...
| Hiyas
|
| I am currently working on Oracle Report which ties in with my a report
| in the ebusiness suite of Oracle telesales module.
|
| Basically, the address on statement reports have blank fields (null)
| where the customer does not have and address2, address 3,
|
| At present its set up to read customers
| ADDRESS1
| CITY
| COUNTY
| POSTAL CODE
|
| But if the customer does have an address 2 or 3 fields I can do this
| by adding in ADDRESS2 AND ADDRESS3 to both my SQL Query and report.
| However, not all addresses have 2nd & 3rd Address fields, hence all
| the other statments will appear as 'null fields' making the address
| for some customers gappy?
|
|
|
| I want to write a DECODE statement whereby, if ADDRESS2 AND ADDRESS3
| are NULL to skip to the next field being 'CITY'?
|
| Please help...
|
| Cheers

you might want to try just setting Vertical Elasticity property for the
fields

regarding the decode, you can use the standard syntax [ decode ( expression,
match1, display1, match2, display2.... default) ] on the concatenation of
ADDRESS2 and ADDRESS3,
or use a decode for each, appending the expression(s) to the address1
column. don't forget to imbed a newline with the appended address line(s)

;-{ mcs
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.