dbTalk Databases Forums  

BIT_COMPLEMENT function giving errors..

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss BIT_COMPLEMENT function giving errors.. in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shishir
 
Posts: n/a

Default BIT_COMPLEMENT function giving errors.. - 07-04-2007 , 06:11 AM






hi friends,

I am trying to migrate a t-sql code to pl/sql code using oracle
migration workbench..
i have modfied the code to include xml handling functions in pl/sql .
On compiling i am getting the following errors. 'IsVisible' is a
column in the LIBRARYTree and it is of type bit holiding only 0 0r
1..The errors are :

Line # = 18 Column # = 4 Error Text = PL/SQL: SQL Statement ignored
Line # = 19 Column # = 31 Error Text = PLS-00306: wrong number or
types of arguments in call to 'BIT_COMPLEMENT'
Line # = 19 Column # = 23 Error Text = PL/SQL: ORA-00904:
"UTL_RAW"."BIT_COMPLEMENT": invalid identifier

CREATE OR REPLACE PROCEDURE usp_LIBRARYHideUnhideTreeNodes
(
-- Add the parameters for the stored procedure here
v_paramMyXml IN CLOB DEFAULT NULL

)
AS
BEGIN

--add the passed xml string to the table with the xmltype column
INSERT INTO XMLTEST values
(XMLTYPE(v_paramMyXml));

UPDATE LIBRARYTree
SET IsVisible = UTL_RAW.BIT_COMPLEMENT(IsVisible)
WHERE NodeId IN ( select extractValue(data_xml,'HiddenNodes/Node/
id' ) as nodefinder
from XMLTEST);

END;

Any help in this regard will be appreciated??

Thanks in advance.

Shishir.


Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: BIT_COMPLEMENT function giving errors.. - 07-04-2007 , 08:16 AM






Shishir wrote:
Quote:
hi friends,

I am trying to migrate a t-sql code to pl/sql code using oracle
migration workbench..
i have modfied the code to include xml handling functions in pl/sql .
On compiling i am getting the following errors. 'IsVisible' is a
column in the LIBRARYTree and it is of type bit holiding only 0 0r
1..The errors are :

Line # = 18 Column # = 4 Error Text = PL/SQL: SQL Statement ignored
Line # = 19 Column # = 31 Error Text = PLS-00306: wrong number or
types of arguments in call to 'BIT_COMPLEMENT'
Line # = 19 Column # = 23 Error Text = PL/SQL: ORA-00904:
"UTL_RAW"."BIT_COMPLEMENT": invalid identifier

CREATE OR REPLACE PROCEDURE usp_LIBRARYHideUnhideTreeNodes
(
-- Add the parameters for the stored procedure here
v_paramMyXml IN CLOB DEFAULT NULL

)
AS
BEGIN

--add the passed xml string to the table with the xmltype column
INSERT INTO XMLTEST values
(XMLTYPE(v_paramMyXml));

UPDATE LIBRARYTree
SET IsVisible = UTL_RAW.BIT_COMPLEMENT(IsVisible)
WHERE NodeId IN ( select extractValue(data_xml,'HiddenNodes/Node/
id' ) as nodefinder
from XMLTEST);

END;

Any help in this regard will be appreciated??

Thanks in advance.

Shishir.
Oracle version number?
DDL for the librarytree table?

One possibility is that you had mixed-case object/column names in SQL
Server and brought those into Oracle. If you've done so you will get
to wrap every name in double quotes for the rest of your life or you
will quickly fix the problem and make sure all names are all upper
case all of the time.

Get the DDL as follows:
SELECT dbms_metadata.get_ddl('TABLE', 'LIBRARYTREE');
if that doesn't work you know what the problem is.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.