Problem of data model ORA-00911: invalid character
I am confronted with error when I run beepHelp me
< name of dataTemplate = "SrBysrtype" description = "ServiceRequestBySrtype" than one dataSourceRef = 'demo' defaultPackage = "BIP_DateRange" >
< Parameters >
< name of the parameter 'p_Fromsrdate' = 'char' dataType = / >
< name of the parameter 'p_Tosrdate' = 'char' dataType = / >
< / Parameter >
< dataQuery >
< SQLStatement instance name = "Q1" >
<! [CDATA]
SELECT
incident. Incident_Number as ServiceRequestNumber,
To_char (incident.incident_date,'DD-MON-YYYY "") as ServiceRequestDate,
incident. Summary summary,
agenttime. AgentName as Nom_agent,
TO_CHAR (agenttime.agentstarttime,'DD-MM-YYYY HH24:MI:SS) as StartTime.
TO_CHAR (to_date('00:00:00','HH24:mi:SS') +)
(agenttime. EndTime - agenttime.agentstarttime), "HH24:MI:SS") as TimeSpent
OF cs_incidents_all_b the incident cs_agenttime_agv agenttime, where & srwhereclause;]] >
< / sqlStatement >
< / dataQuery >
< name dataTrigger = "beforeReport" source = "BIP_DateRange.BeforeReport ()" / >
< dataStructure >
< name of group = "G_SR" datatype = "varchar2" source = "Q1" >
< element name = "Incident_Number" value = "ServiceRequestNumber" / >
< element name = "Incident_date" value = "ServiceRequestDate" / >
< element name = "Summary" value = "Summary" / >
< element name = "nom_agent" value = "Nom_agent" / >
< element name = "agentstarttime" value = "StartTime" / >
< element name = "AgentDuration" value = "TimeSpent" / >
< / Group >
< / dataStructure >
< / dataTemplate >
create or replace
package BIP_DateRange as
srwhereclause varchar2 (1000): = ' ';
p_Fromsrdate varchar2 (400);
p_Tosrdate varchar2 (400);
function BeforeReport return Boolean;
end BIP_DateRange;
create or replace
package body BIP_DateRange as
function boolean return BeforeReport is
Start
If p_Fromsrdate is not null then
srwhereclause: = 'agenttime.incident_id = incident.incident_id | ' AND incident.incident_date between TO_DATE ('| p_Fromsrdate |', "DD-MON-YYYY")';
end if;
If p_Tosrdate is not null then
srwhereclause: = srwhereclause | "AND TO_DATE ('| p_Tosrdate |',"DD-MON-YYYY")';
end if;
Returns true;
end;
end BIP_DateRange;
help me I am new to BEEP with data model
Hmm, can you send me an email to [email protected] please?
I think that there are two different methods. In fact I have no test system for this here at the moment, so I can't try for me...
Add two parameters to your package specifications:
>
create or replace
package BIP_DateRange as
srwhereclause varchar2 (1000): = '1 = 1';
P_FROM varchar2 (400);
p_to varchar2 (400);
p_fromdate varchar2 (400);
p_todate varchar2 (400);
function beforereport (p_from varchar2, p_to in varchar2) return Boolean;
end BIP_DateRange;
Tags: Business Intelligence
Similar Questions
-
ORA-00911: invalid character error.
Hi all
I use ODI 11 g and Oracle 11 g.
I use the query in proc in ODI below. When the data in the table is inserted it says ORA-00911: invalid character error.
INSERT INTO SD_CAMP
SELECT DISTINCT CAMPGN_NO, PRODUCT, NULL.
CAMPG_NAM, trunc (sysdate), trunc (sysdate) + 182
OF SP_ODI_TEMP;
I also inserted the value also hard coded in ODI, but it still says the same error.
Values inserted INTO the SD_CAMP ("'SAS06', ' SBC", NULL, 'SB CUST FFT', TO_DATE('02-NOV-12','DD-MON-YY'),)
TO_DATE('03-MAY-13','DD-MON-YY'));
I ran this query in Oracle db but his works very well.
Any help how to solve this problem?
Thank you
LonyPut it in two different stages.
-
ORA-00911: invalid character in SQL dynamic
I think I need another set of eyes. I do not see the invalid character in this dynamically generated SQL statement:
INSERT INTO source_arc select v.*, sysdate, 'archived' from source v where v.id IN ( SELECT * FROM TABLE( SELECT CAST(str2tbl( 1,2,4 ) AS myTableType ) FROM dual ));
Here is the complete configuration:
create or replace type myTableType as table of number; / create or replace function str2tbl( p_str in varchar2 ) return myTableType as l_str varchar2(32767) default p_str || ','; l_n number; l_data myTableType := myTabletype(); begin loop l_n := instr( l_str, ',' ); exit when (nvl(l_n,0) = 0); l_data.extend; l_data( l_data.count ) := trim(substr(l_str,1,l_n-1)); l_str := substr( l_str, l_n+1 ); end loop; return l_data; end str2tbl; / create table source ( id number ,txt varchar2(25) ) / insert into source values(1,'aaa') / insert into source values(2,'bbb') / insert into source values(3,'ccc') / insert into source values(4,'ddd') / insert into source values(5,'eee') / commit ; create table source_arc ( id number ,txt varchar2(25) ,dt date ,comments varchar2(512) ) /
)
/
Here is the result when I run this code:
DECLARE i_owner_tbl_arc varchar2(61) := 'source_arc'; i_owner_tbl varchar2(61) := 'source' ; v_qry varchar2(32767) := 'INSERT INTO ' || i_owner_tbl_arc ; g_content_list varchar2(32767) := '1,2,4'; BEGIN v_qry := v_qry || chr(10) || 'select v.*, sysdate, ''archived'' ' || chr(10) || 'from ' || i_owner_tbl || ' v ' || chr(10) || 'where v.id IN ( SELECT * ' || chr(10) || ' FROM TABLE( SELECT ' || chr(10) || ' CAST(str2tbl( ' || g_content_list || ' ) ' || chr(10) || ' AS myTableType ' || chr(10) || ' ) ' || chr(10) || ' FROM dual ));'; execute immediate v_qry; END ; / ERROR at line 1: ORA-00911: invalid character ORA-06512: at line 17
Any help appreciated.
Remove the semicolon at the end of the string and put single quotes while calling the function.
Try the below
DECLARE
i_owner_tbl_arc varchar2 (61): = "source_arc";
i_owner_tbl varchar2 (61): = 'source ';
v_qry varchar2 (32767): = 'INSERT INTO ' | i_owner_tbl_arc;
g_content_list varchar2 (32767): = '1,2,4';
BEGIN
v_qry: = v_qry | Chr (10) |
"select v.*, sysdate,"archived"| Chr (10) |
'from ' | i_owner_tbl | ' v ' || Chr (10) |
«where v.id IN (SELECT * ' |)» Chr (10) |
' TABLE (SELECT ' |) Chr (10) |
"CAST (str2tbl ("' |)) ". g_content_list | ''' ) ' || Chr (10) |
' AS myTableType ' || Chr (10) |
' ) ' || Chr (10) |
' FROM dual ))';
immediately run v_qry;
END;
-
Hi all
I am trying to load the data in the 1 table to another using ODI 10 g. My approach is error ed out in step 3 - load data showing the exception below
When I see the description of the sql that runs to the phase I see below911 : 42000 : java.sql.SQLException: ORA-00911: invalid character java.sql.SQLException: ORA-00911: invalid character at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503) at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965) at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026) at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java) at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java) at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java) at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java) at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java) at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java) at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java) at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java) at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java) at com.sunopsis.dwg.cmd.e.k(e.java) at com.sunopsis.dwg.cmd.g.A(g.java) at com.sunopsis.dwg.cmd.e.run(e.java) at java.lang.Thread.run(Unknown Source)
OBV when this sql is tried of toad is giving the same error.select _ACTIVITIES_V.ACTIVITY_ID C1_ACTIVITY_ID, _ACTIVITIES_V.ATTRIBUTE15 C42_ATTRIBUTE15 from .COM_ACTIVITIES_V _ACTIVITIES_V where (1=1)
Please advice what's not here
thnksHello
In topology-> physical schema Manager, where you set the source of Oracle schema, you left the WORKING PATTERN as empty. Put a schema name in the scheme of work and this. will be preceded by the name of this schema
Also, for better visibility, you change the table alias name in the interface of
ACTIVITIESV
TO
ACTIVITIES_VThank you
Fati -
I am trying to run
"AUDIT INSERT, UPDATE, DELETE on emp BY ACCESS WHENEVER SUCCESSFUL;"
in "SQL commands" on oracle-apex (version 4.2.5.00.08).
I get the error message ' ORA-00911: invalid character '.
Can someone tell me the solution for this?
Apex environment we need to set the database AUDIT_TRAIL to TRUE for the control
"AUDIT INSERT, UPDATE, DELETE on emp BY ACCESS WHENEVER SUCCESSFUL;" to work.
By their Summit, to be able to change the setting of database AUDIT_TRAIL we have to log-in as a DBA from the link "SQL workshop--> utilities--> on the database.
-
Please can I know what is cauing this error to occur in SQL tunning games.DECLARE my_task_name VARCHAR2(30); my_sqltext CLOB; BEGIN my_sqltext := 'select l.cp_name, (select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''committed'' and e.mop_id=l.id) as Committed, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''published'' and e.mop_id=l.id) as Published, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''quarantined'' and e.mop_id=l.id) as Quarantined, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''expiredFromQuarantine'' and e.mop_id=l.id) as Expired, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''failed'' and e.mop_id=l.id) as Failed, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''valid'' and e.mop_id=l.id) as Valid, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and s.status=''invalid'' and e.mop_id=l.id) as Invalid, '|| '(select count(distinct e.youview_id) '|| 'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '|| 'and e.mop_id=l.id) as Total '|| 'from mips_mdm.mop_lookup l order by l.id;'; my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK( sql_text => my_sqltext, user_name => 'MIPS_MDM', scope => 'COMPREHENSIVE', time_limit => 60, task_name => 'my_sql_tuning_taskMIPS4', description => 'Task to tune a query on a specified employee'); END; / SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_taskMIPS4') FROM DUAL; GENERAL INFORMATION SECTION ------------------------------------------------------------------------------- Tuning Task Name : my_sql_tuning_taskMIPS4 Tuning Task Owner : DEPLOY_CTL Workload Type : Single SQL Statement Scope : COMPREHENSIVE Time Limit(seconds): 60 Completion Status : COMPLETED Started at : 05/24/2011 10:31:59 Completed at : 05/24/2011 10:32:53 ------------------------------------------------------------------------------- Schema Name: MIPS_MDM SQL ID : 9246fjyc01k83 SQL Text : select l.cp_name, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='committed' and e.mop_id=l.id) as Committed, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='published' and e.mop_id=l.id) as Published, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='quarantined' and e.mop_id=l.id) as Quarantined, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='expiredFromQuarantine' and e.mop_id=l.id) as Expired, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='failed' and e.mop_id=l.id) as Failed, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='valid' and e.mop_id=l.id) as Valid, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='invalid' and e.mop_id=l.id) as Invalid, (select count(distinct e.youview_id) from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and e.mop_id=l.id) as Total from mips_mdm.mop_lookup l order by l.id; ------------------------------------------------------------------------------- ERRORS SECTION ------------------------------------------------------------------------------- - ORA-00911: invalid character -------------------------------------------------------------------------------
Published by: BluShadow on May 24, 2011 11:13
addition of {noformat}{noformat} tags
>
"of mips_mdm.mop_lookup the order by l.id;"
>Try to remove the semicolon ';' sql statement (quoted string) and re - run.
Thank you
REDA
-
Error trivial Drives Me Crazy - ORA-00911: invalid character - Oracle 10 g
I have no idea where I was wrong. I get this ORA-00911: invalid character
I looked at the excerpt from tons of times, but could not find a glitch. Code appear nested into a TOAD
CREATE TABLE RoomAssociates ( roomAssociatesID NUMBER(7) , CONSTRAINT roomasso_roomassoid_pk PRIMARY KEY(roomAssociatesID) , roomID NUMBER(7) CONSTRAINT roomasso_roomid_nn NOT NULL , CONSTRAINT roomasso_roomid_fk FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE , roomFacilityID NUMBER(7) CONSTRAINT roomasso_roomfid_nn NOT NULL , CONSTRAINT roomasso_roomfid _fk FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID) , enSuitID NUMBER(7) CONSTRAINT roomasso_ensuitid_nn NOT NULL , CONSTRAINT roomasso_ensuitid_fk FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID) );
Now, this will work:
CREATE TABLE RoomAssociates ( roomAssociatesID NUMBER(7) , CONSTRAINT roomasso_roomassoid_pk PRIMARY KEY(roomAssociatesID) , roomID NUMBER(7) CONSTRAINT roomasso_roomid_nn NOT NULL , CONSTRAINT roomasso_roomid_fk FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE , roomFacilityID NUMBER(7) CONSTRAINT roomasso_roomfid_nn NOT NULL , CONSTRAINT roomasso_roomfid_fk FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID) , enSuitID NUMBER(7) CONSTRAINT roomasso_ensuitid_nn NOT NULL , CONSTRAINT roomasso_ensuitid_fk FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID) );
The error is here:
CONSTRAINT roomasso_roomfid _fk
Better formatting:
CREATE TABLE RoomAssociates ( roomAssociatesID NUMBER(7), CONSTRAINT roomasso_roomassoid_pk PRIMARY KEY(roomAssociatesID), roomID NUMBER(7) CONSTRAINT roomasso_roomid_nn NOT NULL, CONSTRAINT roomasso_roomid_fk FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE, roomFacilityID NUMBER(7) CONSTRAINT roomasso_roomfid_nn NOT NULL, CONSTRAINT roomasso_roomfid_fk FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID), enSuitID NUMBER(7) CONSTRAINT roomasso_ensuitid_nn NOT NULL, CONSTRAINT roomasso_ensuitid_fk FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID) );
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/18/table-elimination-oppure-join-elimination-lottimizzatore-si-libera-della-zavorra/]Published by: Massimo Ruocchio, December 19, 2009 12:05 AM
-
ORA-00911: invalid character
Hello world
I create procedures in ODI so I could execute the PL/SQL code on my tables in ODI.
I tested this stored procedure directly on SQL Developer and it works, but once I put in on a procedure ODI he does not work and gives me an ORA-00911
So what I did, is that I took this same code and it has run on SQL Developer and it runs quite rightly!
Any ideas? or sugestion? I really appreciate your time and your advice.
Best regards.
Parto of the SP (stored procedure) code:
All the X are the ABC characters, so there just letters and vowels from A to Z.
create or replace
PROCEDURE MY_BEAUTIFUL_SP AS
BEGIN
XXXXXX XXXX XXX_X_XXX_2
XXXXXX XXXX XX MOMO605,
XXXXXXX_XX XX XXXX,
XXX_XXX_XX XX XXXX,
(XXX_XXXXX) XXX XX X_XXX_XXX_X,
X_XXX_XXX_XXX_X XX XXXX,
XXXXXXX_XXXX XX XXXXXXX,
"XXX XXXXXXXXXXXX XXXXXXXXXXXX" XX XXX_XXX_XXXX
XXX_X_XXX_XXX XXXX
XXXXXXX XXXXXXX XXXXX
(
XXX_XXXXX XXX XXXXXXX XX
(
XXXXXXXXXX_XXXXX_XXXX XX 'XXXXXXXXX XXXXX + XXXX. "
XXXXXXXXX_XXXXX XX 'XXXXXXXXX XXXXX. "
XXXX XX "XXXX."
XXXXXX_XXXXX XX "XXXXX."
XXXXXXXX XX "XXXXXXXX"
XXXXXXXX XX "XXXXXXXX"
XXXXX XX "XXXXX."
XXX_XXXXXXXXXXX XX 'XXX XXXXXXXXXXX. "
XXXXXXXX XX "XXXXXXXX"
XXX_XXXXXXX XX 'XXX_XXXXXXX. "
XX XX "XX."
XXXXXXXXXXXX XX "XXXXXXXXXXX",.
XX XXX "XXX".
)
)
XX_XX_XXX = "XXX XXXXXXXXXXXX XXXXXXXXXXXX" XXXXX
XX XXXXX XXXXXXX, XX_XX_XXX;
COMMIT;
END MY_BEAUTIFUL_SP;Remove the ';' after VALIDATION and the END MY_BEAUTIFUL_SP
Also, it is best to have your pl/sql code created at the level of the DB... i.e. of procedure/function and then in ODI you put him on the breast
BEGINand
END;
The main advantage, if in the future, you want to make some changes in the part of pl/sql, you can do it from DB and there is no need to generate ODI scenario
Thank you
Fati -
I like to run below myQuery in c#, but saw the error. No idea what is the problem? If I'm running myQuery in Oracle, it runs without error. "I put all the +" before starting the myQuery line and "end of the line. but nothing changes.
myQuery =
with the CBC as
(
Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,
CBC. Nullable src_nullable, decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as src_cons
all_tab_columns CBC
left join (select Cc.Column_Name, Uc.Constraint_Type
of user_cons_columns cc, uc user_constraints
where Cc.Constraint_Name = Uc.Constraint_Name
and Cc.Table_Name = Uc.Table_Name) t
on T.Column_Name = Src.Column_Name
where table_name = 'INSTRUCTOR' and owner = "ERHAN"
),
As TGT
(
Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len,
TGT.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable,
Decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as tgt_cons
from all_tab_columns tgt
left join (select Cc.Column_Name, Uc.Constraint_Type
of user_cons_columns cc, uc user_constraints
where Cc.Constraint_Name = Uc.Constraint_Name
and Cc.Table_Name = Uc.Table_Name) t
on T.Column_Name = TGT. Column_Name
where table_name = 'INSTRUCTOR' and owner = "SARIGUL"
),
col_details as
(
Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;
SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable, src_cons,
TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable, tgt_cons
the CBC
outer join full tgt
on)
SRC.src_col_name = tgt.tgt_col_name
)
)
Select *.
de)
Select the case sensitive option
When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable
then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' ' ||
-case when src_data_type null ('DATE') then
on the other
case
When src_data_type in ('VARCHAR', 'VARCHAR2')
then ' (' |) NVL (to_char (src_data_len), ' ') | ') '
otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')
end
end
||
cases where tgt_nullable = 'Y' then 'null '.
of another end 'not null '.
|| tgt_cons
When tgt_col_name is null
then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' || ' ' || ' ' || src_data_type | ' ' ||
-case when src_data_type null ('DATE') then
on the other
case
When src_data_type in ('VARCHAR', 'VARCHAR2')
then ' ('| nvl (to_char (src_data_len), ' ') |) ') '
otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')
end
end
|| tgt_cons
When src_col_name is null
then 'alter table' | tgt_table_name: ' drop '. tgt_col_name
end alter_statement
of col_details
)
where alter_statement is not null;
using (OracleConnection conn1 = new OracleConnection (connectionString))
{
conn1. Open();
Dim myQuery = "";
using (OracleCommand = new OracleCommand (myQuery, conn1) crtCommand)
{
richTextBox1.AppendText (output);
richTextBox1.AppendText (crtCommand.ExecuteNonQuery (). (ToString());
richTextBox1.AppendText (output);
}
}
VR;
myQuery= @"with src as ( ... ";
That means a @ before the beginning of a string literal mean? -C# Foire - Site Home - MSDN Articles
as an example
OracleCommand cmd = con.CreateCommand(); cmd.CommandText = @"begin apps.mo_global.init('SQLAP'); begin apps.fnd_global.apps_initialize(5710, 20639, 200); end; end;"; cmd.ExecuteNonQuery();
richTextBox1.AppendText (crtCommand.ExecuteNonQuery (). (ToString());
is this correct? Not sure
as example try
using (OracleConnection conn1 = new OracleConnection(connectionString)) { conn1.Open(); string myQuery = "......"; using (OracleCommand crtCommand = new OracleCommand(myQuery, conn1)) { richTextBox1.AppendText(Environment.NewLine); // richTextBox1.AppendText(crtCommand.ExecuteNonQuery().ToString()); OracleDataReader reader = crtCommand.ExecuteReader(); while (reader.Read()) { richTextBox1.AppendText(reader.GetString(0)); // may be also // richTextBox1.AppendText(Environment.NewLine); } richTextBox1.AppendText(Environment.NewLine); reader.Dispose(); cmd.Dispose(); } con.Dispose(); }
-
Error: ORA-00911: invalid character. Where is the character?
Hi all
As I wrote in the topic, I wrote the following code but I get the above error.
Could someone tell me where are the mistakes? Mainly because the console does not specify where it is.
------------------------------------------------------------------------------------------
Select case when ((select EMPRESA
of B_LISTA_EMPLEADOS
where USERNAME = 'ADMIN')) = 'IMASA.
then ((select JORNADA_ANUAL
of B_JORNADAS_Y_RATIOS
where CATEGORY = (())
Select the CATEGORY
of B_LISTA_EMPLEADOS
where USERNAME = 'ADMIN '.
))
and EMPRESA = (())
Select the EMPRESA
of B_LISTA_EMPLEADOS
where USERNAME = 'ADMIN '.
))
and ANO = "2013"
))
else 'no es UN empleado of the empresa"
end case;
like the Jornada
of B_JORNADAS_Y_RATIOS
------------------------------------------------------------------------------------------
Best regards
Hello
Is type data number JORNADA_ANUAL?
then try to_char (JORNADA_ANUAL)
-
EA3: Problems of data Modeller
If I open a data model produced under SQL Developer 3.2.2 SQL Developer 4 EA3 logic model has the attributes column PK shows however that they are not referred to as a PK and FK all attributes are missing.
Thanks for reporting this. We recently became aware of this problem, which occurs when the opening of the models in EA3 created using SQL Developer version 3 or version 3 Data Modeler.
This should be corrected in the next version.
When it is available, we recommend that you use the original definition of version 3 of your model, rather than any version may have registered with EA3.
-
SQL - problem starting Data Modeler
Hello
I created a relational model with Oracle SQL Developer maker data, with a few tables, and everything worked ok.
Yesterday, I made some changes to the model, add columns and another table, saved the template and closed the Data Modeler.
Today - when I tried to open the template, I get only an error 'some objects are not loaded correctly. See the log file for more details"
Shows that the newspaper at the bottom of the Data Modeler: ' Open Design: "model name" "and no details of what went wrong. No other details are provided and as far as I can see - and now I can't view the model at all.
Any ideas how to find the problem / fix in order to retrieve the created model?
Thank you
CoenraadYou must open the file ' a - erd2.xml ' (with text editor) and look for the name of your models - they are in such a construction:
Logic
....
You should not some special characters in the name of the party: <&>'.
'Name' in the example above makes sense (the text between the opening tag and closing name -Philippe
&> -
Re: problems with an invalid character when passing parameters
He driver JDBC used in ojdbc6.jar. I use this driver because I compatibility with Java 6 which is on my computer
The database that I connect is 10.2 (10g) Oracle database.
The connection works fine, it is the analysis of the SQL query where appeared the problem here is the specific code in this
No matter the syntax it is a module of JavaFX and the query syntax does not use the concats «+»
--------------------------------------------------------------------------------
SQL = "select sfrracl_pidm, \n".
"sfrracl_term_code, \n".
"sfrracl_source_cde, \n".
"sfrracl_reg_access_id \n".
of"SFRRACL \n".
"where sfrracl_term_code =? \n ".
'and sfrracl_pidm = \n '.
"(select spriden_pidm from spriden\n.
"where spriden_id =? \n ".
"" and as spriden_id ' G%'\n ' "
'and spriden_change_ind is null);';
stmt = conn.createStatement (sql);
try {}
PS = conn.prepareStatement (sql);
ps.setString (1, stud_id);
ps.setString (2, term_code);
}
catch(fr:SqlException)
{
fr.printStackTrace ();
};
try {}
ps.executeUpdate ();
System.out.Print ("Student ID :"); ")
System.out.println (stud_id);
System.out.Print ("term Code: '");
System.out.println (term_code);
System.out.println (SQL);
ps.executeQuery (); error occurs here
--------------------------------------------------------------------------------
The output and the exception that is thrown is less than
--------------------------------------------------------------------------------
debug output
Student card: GXXXXXXXX
Term Code: 201020
SQL statement in the string
Select sfrracl_pidm,
sfrracl_term_code,
sfrracl_source_cde,
sfrracl_reg_access_id
of SFRRACL
where sfrracl_term_code =?
and sfrracl_pidm =
(by selecting spriden_pidm in spriden
where spriden_id =?
and spriden_id like '% G '.
and spriden_change_ind is NULL);
end debug output
java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
to sfrracl. Main.buttonOnMouseClicked (Main.fx:215)
to sfrracl. Main.buttonOnMouseClicked (Main.fx:215)
to sfrracl. Main.Invoke $(main.) FX:117)
to sfrracl. Main.Invoke $(main.) FX:117)
at com.sun.javafx.functions.Function1.invoke(Function1.java:44)
at com.sun.javafx.functions.Function1.invoke $(Function1.java:38)
at javafx.scene.Node.impl_processMouseEvent(Node.fx:2917)
at javafx.scene.Node.preprocessMouseEvent(Node.fx:2946)
to javafx.scene.Scene$ MouseHandler.process (Scene.fx:1499)
to javafx.scene.Scene$ MouseHandler.process (Scene.fx:1361)
at javafx.scene.Scene.impl_processMouseEvent(Scene.fx:679)
to javafx.scene.Scene$ ScenePeerListener.mouseEvent (Scene.fx:956)
to com.sun.javafx.tk.swing.SwingScene$ SwingScenePanel.doMouseEvent (SwingScene.java:446)
to com.sun.javafx.tk.swing.SwingScene$ SwingScenePanel.mouseClicked (SwingScene.java:454)
at java.awt.AWTEventMulticaster.mouseClicked (unknown Source)
at java.awt.AWTEventMulticaster.mouseClicked (unknown Source)
at java.awt.Component.processMouseEvent (unknown Source)
at javax.swing.JComponent.processMouseEvent (unknown Source)
at java.awt.Component.processEvent (unknown Source)
at java.awt.Container.processEvent (unknown Source)
at java.awt.Component.dispatchEventImpl (unknown Source)
at java.awt.Container.dispatchEventImpl (unknown Source)
at java.awt.Component.dispatchEvent (unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent (unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent (unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent (unknown Source)
at java.awt.Container.dispatchEventImpl (unknown Source)
at java.awt.Window.dispatchEventImpl (unknown Source)
at java.awt.Component.dispatchEvent (unknown Source)
at java.awt.EventQueue.dispatchEvent (unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters (unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter (unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy (unknown Source)
at java.awt.EventDispatchThread.pumpEvents (unknown Source)
at java.awt.EventDispatchThread.pumpEvents (unknown Source)
at java.awt.EventDispatchThread.run (unknown Source)
BUILD FAILED (total duration: 31 seconds)
--------------------------------------------------------------------------------
The invalid character he claims are the? brand but that would mean my setString
does not work I'm following what the documentation explains why is it?Hello. I bet that the character issue is the semicolon at the end of your SQL string...
HTH,
Joe -
"Invalid character" exception procedure ODI
Hello
There is an oracle sql code:
insert into
KATEGORIE_ZASOBU
(ID_KTZ,
UZYT_TWORZACY,
UZYT_OST_MODYFIKACJI,
DET,
DZIEDZICZENIE,
DATA_OST_MODYFIKACJI,
DATA_UTWORZENIA,
DYSPONOWALNA,
SYSTEMOWA,
WYBIERALNA,
OPI,
NAME,
USUNIETA,
ID_KATEGORII1,
ID_POZ_SL,
IMPORT)
values)
KTZ_SEQ. NEXTVAL,
"import."
NULL,
'0',
'0',
NULL,
SYSDATE,
'0',
'0',
'1',
NULL,
"Jednostki WSSE."
'0',
NULL,
(select p.id_poz_sl in the p pozycje_slownikow join slowniki s on p.id_slownika = s.id_sl where s.nazwa like 'TYPY_ZASOBOW' and p.kod = 'OB').
'1'
);
And there are procedure odi, defined as:
-source technology: Undefined (impossible to define)
-target technologies: Oracle
Command0:
-Technology: Oracle
-Transaction: autocommit
-Transaction Isolation: by default
-Command: the same as above (sql query).
And, as a result of the SQL Developer:
1 lines inserted
Result of ODI (procedure called in the package):
ODI-1228: ProcDodajKategorie (procedure) of the task fails on ORACLE ISPIK_DB target connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
Thus, the same sql code is not run. What's wrong? Any tips? Thank you.remove the semicolon (;) - it is not necessary in ODI
-
ORA-00911 during addition of comment in the SQL command.
I work within the ORACLE Database Express Edition page "SQL Command".
The following query works fine for me:
SELECT *.
CUSTOMERS
As soon as I add comments, I get an error ORA-00911:
-It is a comment.
--
SELECT *.
CUSTOMERS
ORA-00911: invalid characterHello
Apex SQL worksheet don't like comments. What is reason you like add comments when you run the query?
You can trySELECT * /*This is a comment.*/ FROM CUSTOMERS
Kind regards
Jari
Maybe you are looking for
-
IPHONE &; IPAD CHARGING
Hi all Can someone can you please tell me how long it takes to load a mini iPad after all 4years usage) and an iPhone 5s (after 1/2 a year of use.) I use a 10w for a 5w for iPhone and iPad? Thank you Kieron
-
Is Yoga 3 Pro a giant USB battery pack?
-
Strange error in worksheet Excel add
I write and read an Excel with Labview. The code does exactly what I want, but after reading the excel file I get an unknown error in the "Excel add sheet" VI (from report generation tool). There are only 2 inputs and 2 outputs on this VI and I can't
-
is it better to repair, restore or reinstall
I would be very grateful to receive advice on the process that would take the least time to solve a problem XP. I am running XP Pro SP3 on a Dell Vostro PC. A week or two ago, I accidentally generated a BSOD when I removed a dvd from the drive while
-
I am running Vista 32 bit. Relocation to keep recent updates of security on 17/04/2013. KB 2393802 KB 2676562 KB 2813170. What can I do to get them to install and get rid of those that are double. Thanks for any help