OWB Deployment Error: Invalid Sql Statement
Hi,
I am getting a error (Deployment Failure) on deploying my map. The map was
successfully deployed before. But suddenly after wards in a later deployment,
this error was given. Dropped the package.. and then still only the package spec was getting created in database, and not the body. Deployment Failure with the
message "Invalid SQL statement".
I have no clue ,where to start debugging from.
hav checked all SETOP and JOINER., and they are fine.
any idea , pls let me know..
it s too urgent.
Thanks and Regards
Hi,
have you checked the package that was created in the target schema? Examining it may help you to identify the problem.
Regards,
Carsten.
Similar Messages
-
I am getting "ORA-00900: invalid SQL statement" error.?
I did installed oracle 11gR2. and used "DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','USER1','USER2')" to see the result like below, but I am getting "ORA-00900: invalid SQL statement" error. Any idea?
I am using:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> desc user1.tbl_a
Name Null? Type
FIELD_A1 NOT NULL NUMBER
FIELD_A2 VARCHAR2(20)
FIELD_A4 NOT NULL NUMBER(5,2)
FIELD_A5 VARCHAR2(10)
FIELD_A6 NOT NULL NUMBER(2)
SQL> desc user2.tbl_a
Name Null? Type
FIELD_A1 NOT NULL NUMBER
FIELD_A2 VARCHAR2(50)
FIELD_A3 DATE
FIELD_A4 NUMBER(5,2)
FIELD_A5 NOT NULL VARCHAR2(10)
SQL> select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual
expected result:
DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','U1','U2')
ALTER TABLE "U1"."TBL_A" ADD ("FIELD_A3" DATE)
ALTER TABLE "U1"."TBL_A" DROP ("FIELD_A6")
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A2" VARCHAR2(50))
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2) DEFAULT 0)
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NULL)
ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A5" NOT NULL ENABLE)Thanks for reply rp,
I got result using "select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual" -
ORA-00900: invalid SQL statement Error while Executing Procedure
Hi:
I am trying to execute following procedure through java code, but i am getting ORA-00900: invalid SQL statement error.
Procedure is :
<code>
(vResult out int)
as
vCardId varchar2(16);
vForacid varchar2(16);
vApp_Entry_No varchar2(10);
vSrNo number(6);
vCardStatus char(1);
vCardStat char(2);
vExpiryDate date;
Cursor cardCur1 is
select u.card_number,trim(u.ACCOUNT_NUMBER),u.CARD_STATUS,to_char(u.EXPIRY_DATE,'dd-MM-yyyy')
FROM DailyCardData u
where default_indicator='1'
and isprocessed = 'N'
order by expiry_date;
begin
vSrNo := 0;
vResult := 0;
open cardCur1;
Loop
fetch cardCur1 into vCardId,vForacid,vCardStat,vExpiryDate;
if cardCur1%NOTFOUND then
exit;
end if;
if (vCardStat != null) then
vCardStatus := 'H';
elsif (vExpiryDate <= sysdate) then
vCardStatus := 'E';
else
vCardStatus := null;
end if;
select a.app_entry_no into vApp_Entry_No from Application a,ApplicationLinkedAccounts l
where l.foracid = vForacid and l.AcSrNo = '1'
and a.app_entry_no = l.app_entry_no
and a.cardid is null
and a.DOWNLOADFILECREATIONFLAG = 'Y';
update Application set CardId = vCardId,
Card_Status = vCardStatus,APPLICATIONPROCESSEDFLAG = 'Y',
APPLICATIONPROCESSEDdate = DOWNLOADFILECREATIONdate
where App_Entry_No = vApp_Entry_No;
commit;
update DailyCardData set isprocessed = 'Y',app_entry_no = vApp_Entry_No
where card_number = vCardId;
commit;
end Loop;
close cardCur1;
vResult := 1;
end;
</code>
Can any body help me in that?
Thank You,
AnupFirst of all I don't see a procedure header.
Secondly I see you commit inside your procedure. This is a bug.
Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
Sybrand Bakker
Senior Oracle DBA -
00900 Invalid SQL Statement error
I'm teaching myself to write stored procedures, working in TOAD 10.5 with Oracle 10g. I keep getting error ORA-00900: invalid SQL Statement. Here's the code, cut down to bare minimum sample size. I can't see where I'm doing anything wrong.
If I cut out the cursor (taking it down to just "Begin" and "End"), it does run, but I can't see anything wrong with the cursor.
Any ideas?
CREATE OR REPLACE PROCEDURE IN_PROCESS_CASES_BOS
IS
V_HELLO VARCHAR2(10);
CURSOR C_MAIN IS
SELECT 'HELLO' FROM DUAL;
BEGIN
OPEN C_MAIN;
LOOP
FETCH C_MAIN INTO V_HELLO;
EXIT WHEN C_MAIN%NOTFOUND;
END LOOP;
CLOSE C_MAIN;
END;
END IN_PROCESS_CASES_BOS;
/Hi,
You've got 2 END statements, but only 1 BEGIN.
It helps a lot if you indent your code, so that every END is right below its correspoding BEGIN, and all the code in between them is indented. The same goes for IF and LOOP statements.
When posting any formatted text on this site (not just code), type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
Try this:CREATE OR REPLACE PROCEDURE IN_PROCESS_CASES_BOS
IS
V_HELLO VARCHAR2(10);
CURSOR C_MAIN IS
SELECT 'HELLO' FROM DUAL;
BEGIN
OPEN C_MAIN;
LOOP
FETCH C_MAIN INTO V_HELLO;
EXIT WHEN C_MAIN%NOTFOUND;
END LOOP;
CLOSE C_MAIN;
END; Lose this line
END IN_PROCESS_CASES_BOS; -
ORA-00900: invalid SQL statement error in procedure
In procedure we referring only 2 tables
Tables:
1) Edw_orders_ref
2) Change_pl
Condisition:
1) whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
2) we pass table name and day values as arguments to the procedure.
3) Based on day column data only we update.
4) Heir day column means partisition values of the table
Procedure is:
create or replace procedure Proc_update_target(P_Day varchar2,p_tablename nvarchar2)
as
TYPE PlCurTyp IS REF CURSOR;
Pl_cv PlCurTyp;
--emp_rec edw_orders_ref%ROWTYPE;
pl_rec Edw_orders_ref.pl%type;
product_rec Edw_orders_ref.product%type;
opt_rec Edw_orders_ref.opt%type;
sql_stmt varchar(3200);
n number:=0;
BEGIN
sql_stmt := 'select lpl.opt,lpl.product,lpl.pl from minddba.change_pl lpl
where exists ( select 1 from '|| p_tablename ||' where '||p_tablename||'.product=lpl.product and '||p_tablename||'.opt=lpl.opt
and '||p_tablename||'.day='||P_Day||' )';
dbms_output.put_line('hi');
OPEN pl_cv FOR sql_stmt ;
LOOP
dbms_output.put_line('hello1');
FETCH Pl_cv INTO pl_rec,product_rec,opt_rec;
EXIT WHEN Pl_cv%NOTFOUND;
dbms_output.put_line('hello');
execute immediate
'update '||p_tablename||' set pl=:rpl
where product=:rproduct
and opt=:ropt
AND day=:day' using pl_rec, product_rec,opt_rec,P_Day;
if Pl_cv%rowcount=10000 then
commit;
end if;
END LOOP;
CLOSE pl_cv;
commit;
exception
when others then
dbms_output.put_line('Error while updating target pl:'||SQLERRM);
end;
it is compile nad debug.
but execution time this error was coming
exec Proc_update_target('20110226','edw_orders_ref')
hi
hello1
hello
Error while updating target pl:ORA-00900: invalid SQL statement
i think in that procedure updata statement is wrong,if any one corect them.Hi,
This are details of table structure and my requirement for that procedure
CREATE TABLE EDW_ORDERS_REF
SO_ID VARCHAR2(20 BYTE) NOT NULL,
SRC_SYS_KY NUMBER(19) NOT NULL,
DAY VARCHAR2(8 BYTE) NOT NULL,
FIN_CLOSE_DT VARCHAR2(8 BYTE) NOT NULL,
SO_LN_ITM_ID VARCHAR2(12 BYTE) NOT NULL,
EXT_EFF_TS VARCHAR2(26 BYTE) NOT NULL,
EFF_FRM_GMT_TS VARCHAR2(26 BYTE) NOT NULL,
CONTRA_FG VARCHAR2(1 BYTE) NOT NULL,
FDW_TRAN_TYPE_CD VARCHAR2(1 BYTE) NOT NULL,
SO4 VARCHAR2(4 BYTE),
SO2 VARCHAR2(2 BYTE),
PUR_AGMT VARCHAR2(20 BYTE),
SF VARCHAR2(6 BYTE),
V_BOX VARCHAR2(18 BYTE),
PL VARCHAR2(30 BYTE),
MCC_CD VARCHAR2(20 BYTE),
OPT VARCHAR2(18 BYTE),
ORDER_UNITS NUMBER(15,3),
SO_OPT_QTY NUMBER(10,3),
SO_DTL_EXT_QT NUMBER(15,3),
ORDER_LIST_LCY NUMBER(18,4),
ORDER_NET_LCY NUMBER(18,4),
ORDER_NET_CLC NUMBER(18,4),
ORDER_LIST_CLC NUMBER(18,4),
CURRENCY_CD VARCHAR2(2 BYTE),
SLS_CHNL_CD VARCHAR2(1 BYTE),
CBN VARCHAR2(20 BYTE),
GEOG_UNIT VARCHAR2(30 BYTE),
PRODUCT VARCHAR2(18 BYTE),
ORDER_NR VARCHAR2(20 BYTE),
ORDER_LINE_NR VARCHAR2(12 BYTE),
LOAD_DT DATE DEFAULT SYSDATE
CREATE TABLE MINDDBA.CHANGE_PL
PRODUCT VARCHAR2(18 BYTE) NOT NULL,
OPT VARCHAR2(3 BYTE) NOT NULL,
PL VARCHAR2(2 BYTE) NOT NULL
1) whenever edw_orders_ref.product=change_pl.product and edw_orders_ref.opt=change_pl.opt condisition satisfied then update edw_orders_ref.pl with change_pl.pl column.
2) we pass table name and day values as arguments to the procedure.
3) Based on day column data only we update.
4) Heir day column means partisition values of the table
When executing this one I got one error like
exec Proc_update_target('20110226','edw_orders_ref');
hi
hello1
hello
ORA-00900: invalid SQL statement -
Sql error ORA-00900: invalid SQL statement
Hi All
I am new to sql and i try to solve this issue i have here.
where i run this query (1) i get this message : ORA-00900: invalid SQL statement
Query : 1
WITH t1
AS (SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
SELECT SUM (call_time)
FROM t1;
output:
i get error: ORA-01722: invalid number
table structure:
select * form test_1;
CID TYPE LG_END_TIME LG_START_TIME
1508643 Dispatching 2012/12/03 14:05 2012/12/03 14:02
1508643 Treatment 2012/12/03 14:00 2012/12/03 14:00
1508643 Initiation 2012/12/03 14:00 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:18 2012/12/03 14:16
1508662 Initiation 2012/12/03 14:01 2012/12/03 14:01
1508662 Treatment 2012/12/03 14:02 2012/12/03 14:01
1508643 Dispatching 2012/12/03 14:02 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:16 2012/12/03 14:02
thanks for all your helpHi All
thanks for helping and giving your support. but the at this time question remains unanswered.
with t1
as (
SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
select * from t1Output:
CID TYPE CALL_TIME CALL_ID1
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4Desired results would be :
group by CID and total time (summed) by each CID
and it will also look like:
CID TYPE CALL_TIME CALL_ID1 total_time
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
0:05:35
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4
0:17:03
Create table :
CREATE TABLE TEST_1
( CID NUMBER NOT NULL,
TYPE VARCHAR2(20 BYTE) NOT NULL,
LG_END_TIME DATE NOT NULL,
LG_START_TIME DATE NOT NULL
Insert statement:
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);Edited by: 855161 on Jan 7, 2013 8:37 AM
Edited by: 855161 on Jan 7, 2013 9:15 AM
Edited by: 855161 on Jan 7, 2013 1:00 PM -
Trying to produce report but have ERROR ORA-00900: invalid SQL statement
Hi,
I am new to Oracle so have been experimenting with a few things to get the hang of it. I have been trying to produce a report, but keep getting the error: ORA-00900: invalid SQL statement.
This happens at my first line of code where I have COLUMN <column_name> HEADING <Heading_name>
So I am a bit confused - is there a command that I am supposed to issue that indicates to SQL*Plus that I am trying to create a report?
Also, if I just delete the COLUMN <column_name> HEADING <Heading_name> rows and just start at BREAK ON <column_name> SKIP 1, it produces the same error.
I am using Oracle 8.0.6 - does this make a difference?
Here is my code:
COLUMN a.p_ctryid HEADING 'Country'
COLUMN s.p_animid HEADING 'Stallion ID'
COLUMN s.p_uname HEADING 'Stallion Name'
COLUMN a.p_animid HEADING 'Horse ID'
COLUMN d.p_careertp HEADING 'Career'
BREAK ON s.p_animid SKIP 1
BREAK ON d.p_careertp SKIP 2
COMPUTE SUM LABEL 'Total' OF d.p_careertp ON REPORT
SELECT DISTINCT a.p_ctryid, s.p_animid, s.p_uname, a.p_animid, d.p_careertp
FROM p_owby.p_animal a, p_owby.p_animal s, p_owby.p_mating m, p_owby.p_anim_dtl d
WHERE m.p_mateyr = 2001
AND a.p_animid = d.p_animid
AND a.p_animid = m.p_animid
AND a.p_animid > 0
AND s.p_animid = a.p_sire
AND a.p_ctryid IN('GB','IRE')
GROUP BY a.p_ctryid, s.p_animid, s.p_uname, d.p_careertp, a.p_animid
ORDER BY a.p_ctryid, s.p_animid, d.p_careertp
Any help would be greatly appreciated!
Thanks in advance!You are trying to do COMPUTE SUM ... ON REPORT but there is no BREAK ON REPORT specified. The computed sum will not be shown unless you also break on report. see below demonstration. first select has no sum even though we have specified COMPUTE. The second select shows the sum since now we have done break on report.
SQL> compute sum of sal on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
14 rows selected.
SQL> break on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
sum 29025
14 rows selected.
SQL> -
Executing Stored Procedure from TOAD: ORA-00900: invalid SQL statement
Ok…I have ALL the stored procedures converted into Oracle…now, when I go to test them I am getting the vague error of:
ORA-00900: invalid SQL statement
I am attempting to execute:
--EXEC IEXGetAgentSysPerf(to_date('2008/09/01', 'yyyy/mm/dd/'), to_date('2008/09/11', 'yyyy/mm/dd'), 'US HelpDesk');
EXEC IEXGetAgentSysPerf('9/1/2008', '9/11/2008', 'US HelpDesk');
(Neither work). These are calling a Stored Procedure with the following header:
PROCEDURE IEXGetAgentSysPerf (
v_curparm_IEXGetAgentSysPerf IN OUT pkg_IEX.cur_IEXGetAgentSysPerf
,v_BDateTime DATE
,v_EDateTime DATE
,v_WorkGroup VARCHAR2
The IDE is “TOAD” for Oracle. Thanks in advance.Hi,
This is your procedure
PROCEDURE IEXGetAgentSysPerf (
v_curparm_IEXGetAgentSysPerf IN OUT pkg_IEX.cur_IEXGetAgentSysPerf
,v_BDateTime DATE
,v_EDateTime DATE
,v_WorkGroup VARCHAR2
you are providing the ,v_BDateTime DATE,v_EDateTime DATE and v_WorkGroup
and how about "v_curparm_IEXGetAgentSysPerf ". So that procedures is returning the error.
Adding the the earlier post, If you want to test the Stored Procedures... then I say you work on the PL/SQL
Developer which good for debugging (easy to use...) When compare to TOAD.. :-)
Test ..it there...
- Pavan Kumar N -
Query cannot be parsed within the Builder ORA-00900: invalid SQL statement
Why am I getting the error message "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00900: invalid SQL statement"
If I run the query in sqlplus it comes back with "no rows selected" which is what I want.
The function is valid and the user has privileges to run it.
Is there something I can do about it?
If I only have any field instead of the function the error goes away.
Can someone explain what is happening? I'm using 2.0.
select
F_TOTAL_AMOUNT_PAID('fees',a.acct_fee_id,0) "Fee Paid"
from fee_component a, fee b, license c
where a.acctfee_id = b.acctfee_id
and b.license_id = c.license_id
and b.fee_status = 'U'
and c.client_id = :P301_CLIENT_ID
Thanks I really appreciate any help I can get.Does your parsing schema have direct granted privileges to execute the function or privileges via a role? If it is through a role, you need to directly grant execute on the function to your parsing schema.
Mike -
RMAN-10006: error running SQL statement: alter session set remote_dependenc
Backups are failing with following error
RMAN-00554: initialization of internal recovery manager package failed
RMAN-12001: could not open channel default
RMAN-10008: could not create channel context
RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
Not able to change to signature
SQL> alter session set remote_dependencies_mode=signature;
ERROR:
ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
be from among MANUAL, AUTO
I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
Parameter type
String
Syntax
REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value
TIMESTAMP
Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM
=======================================
I believe it could be because of following bug
"A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
I appreciate your effort in fixing this issue.
Edited by: user10610722 on Nov 25, 2008 4:37 PMHi:
It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe). -
Invalid SQL Statement when using execute for running Procedures
Hi ,
I create a simple stored procedure , it was created successfully , when i tried to run the StoredProcedure , it is giving me
exec myStoredProcedure() ;
please tell me why this is coming .hi
i am using oracle 10g with asp.net
i have created a procedure and it executed successfully, when i executed with exce <storedproc>
but when i call up this procedure with .net it is giving an error like this..
ERROR [42000] [Oracle][ODBC][Ora]ORA-00900: invalid SQL statement
any one pls suggest me how to resolve this issue
here is my stored procedure
create or replace
procedure sp_AddTrial (parStudyName VARCHAR2, parContactName VARCHAR2, parContactNumber varchar2, parDescription varchar2, parFactorName in varchar2, parTreatmentName in varchar2) is
Pos int;
Pos1 int;
parName varchar2(50);
parTName varchar(30);
parFactorNames varchar2(500);
parTreatments varchar2(500);
parWeight int;
parValue varchar2(20);
parValue1 varchar2(20);
parValue2 varchar2(20);
parValue3 varchar2(20);
begin
parFactorNames :=parFactorName;
parTreatments :=partreatmentname;
insert into mivrs_studyinfo(
study_id,
study_name,
contact_name,
phone_number,
description,
created_date,
modified_date
values
mivrs_studyinfo_seq.NEXTVAL,
parStudyName,
parContactName,
parContactNumber,
parDescription,
sysdate,
sysdate
if parTreatments is not null then
parTreatments := Concat(TRIM(parTreatments),',');
Pos1 := INSTR(parTreatments,',');
insert into temp values(1,'test');
IF length(parTreatments)!= 0 then
WHILE Pos1 > 0
loop
insert into temp values(2,Pos1);
parTName := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
parTreatments := SUBSTR(parTreatments,Pos1 + 1);
Pos1 := INSTR(parTreatments,',', 1);
parWeight := TRIM(SUBSTR(parTreatments,0, Pos1 - 1));
IF length(parTName) != 0 then
insert into mivrs_treatments (treatment_id, treatment_name, weight, study_id, created_date, modified_date) values (mivrs_treatments_seq.NEXTVAL, parTName, parWeight, mivrs_studyinfo_seq.CURRVAL,sysdate, sysdate);
end if;
parTreatments := SUBSTR(parTreatments, Pos1+1);
Pos1 := INSTR(parTreatments,',');
END loop;
END IF;
end if;
if parFactorNames is not null then
parFactorNames := Concat(TRIM(parFactorNames),',');
Pos := INSTR(parFactorNames,',');
IF length(parFactorNames)!= 0 then
WHILE Pos > 0
loop
parName := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue1 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue2 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
parFactorNames := SUBSTR(parFactorNames,Pos + 1);
Pos := INSTR(parFactorNames,',', 1);
parValue3 := TRIM(SUBSTR(parFactorNames,0, Pos - 1));
IF length(parName) != 0 then
insert into mivrs_stratificationfactors (factor_id, factor_name, study_id, value1,value2,value3,value4) values (mivrs_stratfactors_seq.NEXTVAL, parName, mivrs_studyinfo_seq.CURRVAL,parValue,parValue1,parValue2,parValue3);
end if;
parFactorNames := SUBSTR(parFactorNames, Pos+1);
Pos := INSTR(parFactorNames,',');
END loop;
END IF;
end if;
end;
thank u
Sowjanya -
Kodo 3.0 generates invalid SQL statement when deleting an instance
Hi,
kodo 3.0 generates an invalid SQL statement when deleting an instance
that has a one-many inverse unidirectional association.
All manipulations of the data go just fine except for the deletion of
instances of Whole without Parts. Kodo 3.0 generates the following SQL
statement UPDATE PART SET WHERE PARTID= ?.
This problem does not occur when using a bidirectional relationship
between Whole and Part. Is there an error in the mapping file somewhere?
Thanks in advance,
Stijn
database schema
<table name="PART">
<column name="PARTID" type="bigint"/>
<fk to-table="WHOLE">
<join column="PARTID" to-column="WHOLEID"/>
</fk>
</table>
<table name="WHOLE">
<column name="WHOLEID" type="bigint"/>
</table>
classes
public class Whole implements javax.jdo.InstanceCallbacks{
private java.util.Set parts = new java.util.HashSet();
public void jdoPreDelete {
//implements cascading delete
public class Part implements javax.jdo.InstanceCallbacks{
private int partid;
mapping
<class name="Whole">
<field name="parts">
<jdbc-field-map type="one-many" column.PARTID="PARTID"
ref-column.WHOLEID="PARTID" table="PART"/>
</field>This bug is caused by the fact that your FK is using a column that is
not nullable (in this case, because it is also a PK column). It is
definitely a bug on our side, but I wanted to let our users know that
most one-sided one-many relations won't exhibit this problem.
Thank you for the report; we will try to correct the problem in an
upcoming release. -
Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/ZREVISQTY
Dear Guys,
Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
Manythanks
ArunDear Guys,
Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
Manythanks
Arun -
Error in SQL Statement: SAPSQL_INVALID_TABLENAME
Hello all,
While displaying contents of infocube i am getting strange error ..
Error in SQL Statement: SAPSQL_INVALID_TABLENAME ABC
Message no. DBMAN256
( Table name length is 16 )
I am able to see the contents of Fact table.
Could not found any solution till now.. Any lights , views will be very much helpful.
Regards
Nimeshhi Nimesh,
check oss note 835816
Symptom
When you execute a query, a data-mart, SEM, APO or similar access, an SQL error 4004 occurs "Unknown table name" Open SQL: Short dump with UNCAUGHT_EXCEPTION CX_RSR_X_MESSAGE in the ABAP Call Stack, you find the RSDRC_BASIC_DB_QUERY_DATA_GET function module.
Prior to this, relatively large datasets (more than 10%) were deleted from the InfoCube.
Other terms
Business Information Warehouse, Factview, DBMAN256, DBMAN
256, SAPLRSDRS, DELETE, DELETE_FACTS, RSDRD_DELETE_FACTS
Reason and Prerequisites
During the purge, the fact tables are rebuilt again as of a certain percentage, for performance reasons. The factview is then not created again.
Solution
Views that are already missing can be compiled again with the SAP_FACTVIEWS_RECREATE report.
The correction prevents the problem reappearing.
BW 3.0B
Import Support Package 27 for 3.0B (BW3.0B Patch27 or SAPKW30B27) into your BW system. The Support Package is available whennote 0723258 with the short text "SAPBWNews BW3.0B Support Package 27", which describes this Support Package in more detail, is released for customers.
BW 3.10 Content
Import Support Package 21 for 3.10 (BW3.10 Patch21 or SAPKW31021) into your BW system. The Support Package is available whennote 0723263 with the short text "SAPBWNews BW3.1 Content Support Package 21", which describes this Support Package in more detail, is released for customers.
BW 3.50
Import Support Package 13 for 3.5 (BW3.50 Patch13 or SAPKW35013) into your BW system. The Support Package is available when note 0765114 with the short text "SAPBWNews BW Support Package 13 NetWeaver'04 Stack 13", which describes this Support Package in more detail, is released for customers.
In urgent cases you can use the correction instructions.
These notes may already be available before the Support Package is released, to make information available in advance. However, the short text then still contains the words "preliminary version". -
Hi,
Can anyone see why I am getting this error message for my SQL query?
WITH SKU_DATA AS (
SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
SKU_ID,
DESCRIPTION,
UPDATE_QTY,
ORDER_ID,
CONSIGNMENT,
WEIGHT,
PALLET_ID,
CASE
WHEN Upd_Qty_Ratio < 1
THEN TO_CHAR(UPDATE_QTY) || 'U'
WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) * USER_DEF_NUM_3, 6)) || 'U'
END CU_Sum
FROM (
SELECT DISTINCT
FROM_LOC_ID,
S.SKU_ID,
S.DESCRIPTION,
ITL.UPDATE_QTY,
S.USER_DEF_NUM_3,
OH.ORDER_ID,
ITL.CONSIGNMENT,
ITL.PALLET_ID,
NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
WHERE ITL.SKU_ID = S.SKU_ID
AND ITL.CODE = 'Pick'
AND ITL.CONSIGNMENT = $P{Consignment}
AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
AND OH.ORDER_ID = ITL.REFERENCE_ID
AND ITL.TO_LOC_ID = 'CONTAINER'))
SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
(SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
FROM SKU_DATAThanks in advance.
SM.Hi Sean,
It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
SM
Maybe you are looking for
-
my apple id is not working when i sign in from my laptop it works but when i sign in from my iphone4 then its not working it gives the message of "your aapleid or password is incorrect"? how can i solve this problem please help
-
Editing text in acrobat xi pro
I had to reinstall acrobat xi pro but now I am unable to edit any text or images. Can anyone advise me? Many Thanks sean
-
I own a HP Pavillion PC p6631 connected to a HP2010i monitor and would like to have the monitor connected to 2 hard drives but only see one DVI input connector and I believe I need another one. Can this be done and if so how. Thank you This ques
-
SAP Query : additional field
Hi, in my HR query i need to add a new field in infotype specific 9016 to be calculated by ABAP code. I perform the following steps : - transaction SQ02, i modify my info-set, in the node of my infotype i add a new field, i give a new name and a LIKE
-
Hello, What happens if an ejb starts a transaction (trans_id). In the transaction there are for example one insert, one update and one delete statements to the database. The insert Statament was made and then t