|
-
Originally posted by jmodic
If you don't want that UPPER() expression in your select list, you can change your cursor to something like:
SELECT region_name,region_id FROM
(
select region_name,region_id
from region
where region_id <> p_selectedRegionId
and rank is null
and region_type = 'Global'
MINUS
select a.region_name,a.region_id
from region a, regionhierarchy b
where b.region_child_id=a.region_id
and b.region_parent_id = p_selectedRegionId
and a.rank is null
and region_type = 'Global'
)
order by upper(region_name);
Hi Jurij,
I tried one of your solutions and it works fine with upper but when i use it with decode it gives me a Invalid Number error.
1 SELECT region_name,region_id FROM
2 (
3 select region_name,region_id
4 from region
5 where region_id <> 55615
6 and rank is null
7 and region_type = 'Global'
8 MINUS
9 select a.region_name,a.region_id
10 from region a, regionhierarchy b
11 where b.region_child_id=a.region_id
12 and b.region_parent_id = 55615
13 and a.rank is null
14 and region_type = 'Global'
15 )
16* order by decode(region_name,'Worldwide ',1,region_name)
SQL> /
SELECT region_name,region_id FROM
*
ERROR at line 1:
ORA-01722: invalid number
Why is that
Thanks
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
|