Re: cast and packages don't seem to mix in 8.1.7.4 - .net issues tryi ng to fake a boolean.

  • From: Connor McDonald <hamcdc@xxxxxxxxxxx>
  • To: "Oracle L (E-mail)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 22 Jan 2005 01:59:49 +0000 (GMT)

How about just using to_char ? or try making the SQL dynamic, ie

open cursor for '....'

hth
connor

--- "Duret, Kathy" <kduret@xxxxxxxxxxxxxxxxxxxx> wrote:

> PROCEDURE BA_TRD_PROC(
>          P_ALL_ROWS_CURSOR out cursorvar,
>          P_START_DATE      in  EV.TRDDATE%type,
>          P_END_DATE        in  EV.TRDDATE%type
> ) 
> 
>      is
>        begin
>           open P_ALL_ROWS_CURSOR for
> 
> select 
>        cast(nvl(bc.confirm,0) as char(1) )  Confirm
>          , v.*
>        , positionXr.eodrate as positionEOd
>        , mv.price as mark_price
>        , decode(nvl(sb.broker,'P'),'P','Prime','Swap') as prime_swap
>        , bc.comments
> from ...
> 
> When I execute just the select statement... all is well.  If I execute it in
> the package I get:
> 
>  a pl/sql error 801 internal error 74030
> 
> So I assume this means I can't use cast in packages.
> 
> What my problem is Oracle doesn't have a boolean and the user wants me to
> pass a boolean.  .Net doesn't like the confirm defined as a number(1).  So I
> was trying to see if I could pass back a char(1) to see if it would handle
> this like a boolean.
> 
> The user wants to keep his precious package and the poor developer and I are
> kind of stuck.
> 
> Thanks,
> 
> Kathy
> 
> 
> 
> 
> This transmission contains information solely for intended recipient and may
> be privileged, confidential and/or otherwise protect from disclosure.  If
> you are not the intended recipient, please contact the sender and delete all
> copies of this transmission.  This message and/or the materials contained
> herein are not an offer to sell, or a solicitation of an offer to buy, any
> securities or other instruments.  The information has been obtained or
> derived from sources believed by us to be reliable, but we do not represent
> that it is accurate or complete.  Any opinions or estimates contained in
> this information constitute our judgment as of this date and are subject to
> change without notice.  Any information you share with us will be used in
> the operation of our business, and we do not request and do not want any
> material, nonpublic information. Absent an express prior written agreement,
> we are not agreeing to treat any information confidentially and will use any
> and all information and reserve the right to publish or disclose any
> information you share with us.
> --
> //www.freelists.org/webpage/oracle-l
> 


=====
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
ISBN: 1590592174

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald@xxxxxxxxx

Coming Soon! "Oracle Insight - Tales of the OakTable"

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, 
and...he will sit in a boat and drink beer all day"

------------------------------------------------------------


                
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 
--
//www.freelists.org/webpage/oracle-l

Other related posts: