Cursor: Passing Oracle functions?
Darren Reely
darren_reely@latticesemi.com
Wed, 09 Feb 2000 10:30:33 -0800
Hi everyone,
I'd like to know if there is a way to pass the Oracle Decode function
through Quick to the database for data selection. The first cursor
definition below is what I'd like to replace the second definition. Is
this possible or are all non ANSI SQL functions not allowed? I think I'm
out of luck.
sql in mfg declare bins_rlsd_lots_v cursor for &
( decode(:t_in_test_fac,test_facility,'1','9') as
mysortorder, &
bins_rlsd_lots_v.* &
from bins_rlsd_lots_v &
where facility = :trunc(t_in_fac) &
AND test_facility = :trunc(t_in_test_fac) &
and pkg = :pkg of ilf_issue_sheet &
and lot_status not in ('HOLD','COMPLETE') &
::and_where_clause &
) ::order_clause
sql in mfg declare bins_rlsd_lots_v cursor for &
( select '1' as mysortorder, &
bins_rlsd_lots_v.* &
from bins_rlsd_lots_v &
where facility = :trunc(t_in_fac) &
AND test_facility = :trunc(t_in_test_fac) &
and pkg = :pkg of ilf_issue_sheet &
and lot_status not in ('HOLD','COMPLETE') &
::and_where_clause &
union &
select '9' as mysortorder, &
bins_rlsd_lots_v.* &
from bins_rlsd_lots_v &
where facility = :trunc(t_in_fac) &
AND (test_facility IS NULL
OR test_facility <> :trunc(t_in_test_fac)) &
and pkg = :pkg of ilf_issue_sheet &
and lot_status not in ('HOLD','COMPLETE') &
::and_where_clause &
) ::order_clause
Thanks for the help,
Darren
P.S.
We are running Oracle7 Server Release 7.3.4.4.0,
PH 813d1 (d2 didn't help),
Sun Solaris 2.6 (SunOS 5.6).
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.