Inserting data in several related tables using the database
Hello worldI'm working on a BPM application using Oracle BPM 11.1.1.5.0 and JDeveloper 11.1.1.5.0.
In my database, I have two tables, loan and guarantee that are related by a field named employeeID (PK on loan) and FK in warranty.
Each line can have several lines of guarantee.
At this point, I'm doing an entry form for the user to insert data in the two tables.
I did successfully before with a single table that has no relations.
The way I'm doing here is, after the creation of the database successfully adapter, a type of LoanCollection is created in the types module, which can be used to create business objects and data objects of.
The problem is when I create an object of type loanCollection process data and then create a UI generated automatically on that basis, only the fields in the primary table (the Table of loan) appear in the form.
On the other hand, if I create a business object based on the LoanSchema, the form for all of the two tables is created automatically (the loan as a form, the guarantee in a table), but then, when I try to access it in the section processing service mission which calls the database adapter, I have no access to such.
In fact, the only type which can be used in the service task is the process based on the loanCollection data object.
To summorize, I have to use the type of business for my UI object to include all the fields in both tables, so I have to use the data object from the collection process in the transformation of service task dialog box.
And I can't find a way to map to another.
Can someone help me with this please?
Thank you very much
Try to follow these steps.
1. create a new module in your catalogue our BPM project management section
2. in this new module create 3 Business Objects - (LoanBusinessObject, GuaranteeBusinessObject and GuaranteeArrayBusinessObject)
3. Add the attributes appropriate to the LoanBusinessObject and the GuaranteeBusinessObject so that they mimic your database tables, then to the GuaranteeArrayBusinessObject add an array of type attribute GuraranteeBusinessObject
4. now you need to create two process data objects, type loanProcessObject LoanBusinessObject and type guaranteesProcessObject GuaranteeArrayBusinessObject
5. as inputs to your human task adds the loanProcessObject and guaranteesProcessObject, these should now be available in your data controls and can be used to auto generate the form
6. in your dbadapter you'll then use XSL Transformation and use for each so that it will write the data to the ready table and all the line items of warranty for the warranty table.
Tags: Fusion Middleware
Similar Questions
-
"missing the SELECT keyword" error during an insert into the temporary table using the blob value
I'm trying to insert into an oracle temp table using select that retrieves data from a blob field but I get the error: "lack the SELECT keyword.
How we store temporary in oracle result when we make this type of operation (extraction of data in fields and try to load them into a separate table on the fly.?)
with cte as)
Select user_id, utl_raw.cast_to_varchar2 (dbms_lob.substr (PREFERENCES)) as USER my_blob
)
create table new_table as
SELECT user_id,EXTRACTvalue(xmltype(e.my_blob),'/preferences/locale') regional settings
E ETC
----------------------------------------------------------------------------------
BLOB data - value - which is
<? XML version = "1.0" encoding = "ISO-8859-1" ?>
- < Preferences >< time zone > America/New_York < / > zone< displayscheduleinusertimezone > Y < / displayscheduleinusertimezone >< local > Spanish < /locale >< DateFormat > JJ/mm/aaaa < / DateFormat >< timeFormat > hh: mm aaa < / timeFormat >< longformat > Long_01 < / longformat >< doubleformat > Double_01 < / doubleformat >< percentformat > Percentage_01 < / percentformat >< currencyformat > Currency_01 < / currencyformat >< / Preferences >
A WITH clause that must immediately precede the SELECT keyword:
SQL > create table t:
2 with the o as (select double dummy)
3 select * West longitude;
Table created.
-
Insert into a table using the check boxes
Hello
I want to insert into a table emp when I press a button "Insert" area of employee report. the SQL query for the report is
SELECT HTMLDB_ITEM. CheckBox(1,rowNum) "",
x.EmpNo,
x.Ename
de)
Select empno htmldb_item.hidden(2,empno),
htmldb_item. Text(3,Ename) ename from emp) x
order by 2
I created the following process:
declare
v_test varchar (10);
Start
BECAUSE me in 1.HTMLDB_APPLICATION. G_F01. COUNTY
LOOP
v_test: = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
dbms_output.put_line (v_test);
insert into emp(empno,ename,job,mgr,hiredate,sal,comm,deptno)
values(v_test,'A','B',10,01-May-81,200,1,10)
WHERE empno = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
END LOOP;
end;
But IT is not working properly, infact, it gives me errors like:
ORA-06550: line 9, column 47:
PL/SQL: ORA-00933: SQL not correctly completed command
ORA-06550: line 8, column 1:
PL/SQL: SQL statement ignored
7 dbms_output.put_line (v_test);
8 insert into emp (empno, ename, job, mgr, hiredate, sal, comm, deptno)
9 values(v_test,'A','B',10,01-MAY-81,200,1,10)
10 WHERE empno = HTMLDB_APPLICATION. G_F02 (HTMLDB_APPLICATION. G_F01 (i));
11. END OF LOOP;
Any help?
Additional info: table Emp is the default table in the databaseThis is an example showiing how such a process must be put in place:
http://Apex.Oracle.com/pls/OTN/f?p=31517:95
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
What is the best way to apply choice relational tables in the XML document?
I've got an XML document from outside I turn with full DB XSLT document.
Some parts of the document contain codes I want to tranfsorm to significant labels of relational tables in our database.
On road is to disassemble the XML into the relational views and join these views with tables of choice and then back, this time with labels translated, using XMLElement, etc...
Is there another way less heavy? For example,.
Select updateXML)
xml_dta
,'/ / section_to_translate/node_to_translate/variable / text () '
,(
Select the label
of table_recherche
where Group = extractValue (current_node, '... / Group/Text () ')
and code = extractValue (current_node, '... / variable/Text () ')
)
) xml_dta
from my_table
where... criteria
However, I do not know how to move from the current node to the extractValue function (if it is possible?.)
Anyone done the second way?
Thank youYou didn't tell the version of your database, so I assume one of them later.
You can include the part of the translation in the XSL transformation, by accessing an external research paper generated from the database beforehand.
Here is an example of use of the HR diagram example:
(1) the source document that are to be processed: emp.xml
198 Donald OConnell SH_CLERK 199 Douglas Grant SH_CLERK 200 Jennifer Whalen AD_ASST 201 Michael Hartstein MK_MAN 202 Pat Fay MK_REP 203 Susan Mavris HR_REP 204 Hermann Baer PR_REP 205 Shelley Higgins AC_MGR 206 William Gietz AC_ACCOUNT 100 Steven King AD_PRES (2) the lookup table:
SQL> create table lookup_table as 2 select job_id, job_title 3 from hr.jobs; Table created SQL> select * from lookup_table; JOB_ID JOB_TITLE ---------- ----------------------------------- AD_PRES President AD_VP Administration Vice President AD_ASST Administration Assistant FI_MGR Finance Manager FI_ACCOUNT Accountant AC_MGR Accounting Manager AC_ACCOUNT Public Accountant SA_MAN Sales Manager SA_REP Sales Representative PU_MAN Purchasing Manager PU_CLERK Purchasing Clerk ST_MAN Stock Manager ST_CLERK Stock Clerk SH_CLERK Shipping Clerk IT_PROG Programmer MK_MAN Marketing Manager MK_REP Marketing Representative HR_REP Human Resources Representative PR_REP Public Relations Representative 19 rows selected
(3) generate us the document search and store it in the XML DB repository (so that it can be referenced in the XSLT):
SQL> show user User is "dev" SQL> SQL> declare 2 res boolean; 3 begin 4 res := dbms_xdb.CreateResource( 5 abspath => '/public/temp/lookup.xml', 6 data => dburitype('/DEV/LOOKUP_TABLE').getXML 7 ); 8 commit; 9 end; 10 / PL/SQL procedure successfully completed SQL> set long 10000 SQL> select xdburitype('/public/temp/lookup.xml').getCLOB() from dual; XDBURITYPE('/PUBLIC/TEMP/LOOKU --------------------------------------------------------------------------------
AD_PRES President AD_VP Administration Vice President AD_ASST Administration Assistant FI_MGR Finance Manager FI_ACCOUNT Accountant AC_MGR Accounting Manager AC_ACCOUNT Public Accountant SA_MAN Sales Manager SA_REP Sales Representative PU_MAN Purchasing Manager PU_CLERK Purchasing Clerk ST_MAN Stock Manager ST_CLERK Stock Clerk SH_CLERK Shipping Clerk IT_PROG Programmer MK_MAN Marketing Manager MK_REP Marketing Representative HR_REP Human Resources Representative PR_REP Public Relations Representative (4) the sheet XSLT stylesheet (stored in XDB repository as well): emp.xsl
The transformation is rather bland, but the interesting part lies in access to external document within it.
I used a key to index the JOB_ID/function pairs.(5) last step, apply the transformation:
SQL> select xmlserialize(document 2 xmltransform( 3 xmltype(bfilename('DUMP_DIR','emp.xml'),nls_charset_id('AL32UTF8')), 4 xdburitype('/public/temp/emp.xsl').getXML() 5 ) as clob indent 6 ) 7 from dual; XMLSERIALIZE(DOCUMENTXMLTRANSF --------------------------------------------------------------------------------
Donald OConnell Shipping Clerk Douglas Grant Shipping Clerk Jennifer Whalen Administration Assistant Michael Hartstein Marketing Manager Pat Fay Marketing Representative Susan Mavris Human Resources Representative Hermann Baer Public Relations Representative Shelley Higgins Accounting Manager William Gietz Public Accountant Steven King President The input document is transformed and each job_id is replaced by its corresponding label.
-
How to compare the length of the data to a staging table with the definition of the base table
Hello
I have two tables: staging of the table and the base table.
I get flatfiles data in the staging of the table, depending on the structure of the requirement of staging of the table and the base table (length of each column in the staging table is 25% more data dump without errors) are different for ex: If we have the city long varchar 40 column in table staging there 25 in the base table. Once data are discharged into the intermediate table that I want to compare the actual length of the data for each column in the staging table with the database table definition (data_length for each column of all_tab_columns) and if no column is different length that I need to update the corresponding line in the intermediate table which also has an indicator called err_length.
so for that I use the cursor c1 is select length (a.id), length (b.SID) of staging_table;
c2 (name varchar2) cursor is select data_length all_tab_columns where table_name = 'BASE_TABLE' and column_name = name;
But we get atonce data in the first query while the second slider, I need to get for each column and then compare with the first?
Can someone tell me how to get the desired results?
Thank you
Manoi.Hey, Marco.
Of course, you can set src.err_length in the USING clause (where you can reference all_tab_columns) and use this value in the SET clause.
It is:MERGE INTO staging_table dst USING ( WITH got_lengths AS ( SELECT MAX (CASE WHEN column_name = 'ENAME' THEN data_length END) AS ename_len , MAX (CASE WHEN column_name = 'JOB' THEN data_length END) AS job_len FROM all_tab_columns WHERE owner = 'SCOTT' AND table_name = 'EMP' ) SELECT s.ename , s.job , CASE WHEN LENGTH (s.ename) > l.ename_len THEN 'ENAME ' END || CASE WHEN LENGTH (s.job) > l.job_len THEN 'JOB ' END AS err_length FROM staging_table s JOIN got_lengths l ON LENGTH (s.ename) > l.ename_len OR LENGTH (s.job) > l.job_len ) src ON (src.ename = dst.ename) WHEN MATCHED THEN UPDATE SET dst.err_length = src.err_length ;
As you can see, you have to hardcode the names of the columns common to several places. I swam () to simplify that, but I found an interesting (at least for me) alternative grouping function involving the STRAGG user_defined.
As you can see, only the subquery USING is changed.MERGE INTO staging_table dst USING ( SELECT s.ename , s.job , STRAGG (l.column_name) AS err_length FROM staging_table s JOIN all_tab_columns l ON l.data_length < LENGTH ( CASE l.column_name WHEN 'ENAME' THEN ename WHEN 'JOB' THEN job END ) WHERE l.owner = 'SCOTT' AND l.table_name = 'EMP' AND l.data_type = 'VARCHAR2' GROUP BY s.ename , s.job ) src ON (src.ename = dst.ename) WHEN MATCHED THEN UPDATE SET dst.err_length = src.err_length ;
Instead of the user-defined STRAGG (that you can copy from AskTom), you can also use the undocumented, or from Oracle 11.2, WM_CONCAT LISTAGG built-in function.
-
Get the 500 error trying to create a table using the REST API
Hello
I tried to create a table using the REST API for Business Intelligence Cloud, but I got 500 Internal Server Error for a while now.
Here are the details that I use to create a table.
and the json to create the schema that I use is
[{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ["ROWID"]}]
, {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['RELATIONID']},
{'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['ID']}
, {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['RESPONDEDDATE']},
{'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [255], 'columnName': ['RESPONSE']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_CREATEDDATE']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_CREATEDBYID']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_LASTMODIFIEDDATE']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_LASTMODIFIEDBYID']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_SYSTEMMODSTAMP']},
{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [10], 'columnName': ['SYS_ISDELETED']},
[{'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [50], 'columnName': ['TYPE']}]
I tried this using postman and code, but I always get the following response error:
Error 500 - Internal server error
Of RFC 2068 Hypertext Transfer Protocol - HTTP/1.1:
10.5.1 500 internal Server Error
The server encountered an unexpected condition which prevented him from meeting the demand.
I am able to 'get' existing table schemas, delete the tables, but I'm not able to make put them and post operations. Can someone help me to identify the problem, if there is no fault in my approach.
Thank you
Romaric
I managed to create a table successfully using the API - the only thing I see in your JSON which is different from mine is that you have square brackets around your values JSON where I have not. Here is my CURL request and extract my JSON file (named createtable.txt in the same directory as my CURL executable):
curl u [email protected]: password UPDATED h x ' X-ID-TENANT-NAME: tenantname ' h ' Content-Type: application/json '-binary data @createtable.txt https://businessintell-tenantname.analytics.us2.oraclecloud.com/dataload/v1/tables/TABLE_TO_CREATE k
[
{
'columnName': 'ID',
'dataType': 'DECIMAL ',.
'Length': 20,.
"accuracy": 0.
'Nullable': false
},
{
'columnName': 'NAME',
'dataType': 'VARCHAR ',.
'Length': 20,.
"accuracy": 0.
'Nullable': true
},
{
"columnName': 'STATUS."
'dataType': 'VARCHAR ',.
'Length': 20,.
"accuracy": 0.
'Nullable': true
},
{
"columnName': 'CREATED_DATE."
'dataType': 'TIMESTAMP '.
'Length': 20,.
"accuracy": 0.
'Nullable': true
},
{
'columnName': 'UPDATED_DATE ',.
'dataType': 'TIMESTAMP '.
'Length': 20,.
"accuracy": 0.
'Nullable': true
}
]
-
Update a table using the clause
Hello
I want to update a table using the selected values.
Cases in the sample:
create table as empsalary)
Select 1 as empid, 0 in the wages of all the double union
Select option 2, the double 0);
Data update are as follows
with saldata as
(
Select 1 as empid, 5000 as wages, 500 as double pf
Union of all the
Select option 2, 10000,1000 like double pf
)
Select empid, salary saldata
I tried the following query but does not work
updated set of empsalary table (empid, salary) =
(
Select * from)
with saldata as
(
Select 1 as empid, salary, 500 5000 as pf Union double all the
Select option 2, 10000,1000 like double pf
)
Select empid, salary saldata
) sl
where sl.empid = empsalary.empid
)
I use oracle 10g.
Help, please.
Krishna Devi wrote:
Hello
I want to update a table using the selected values.
Cases in the sample:
create table as empsalary)
Select 1 as empid, 0 in the wages of all the double union
Select option 2, the double 0);
Data update are as follows
with saldata as
(
Select 1 as empid, 5000 as wages, 500 as double pf
Union of all the
Select option 2, 10000,1000 like double pf
)
Select empid, salary saldata
I tried the following query but does not work
updated set of empsalary table (empid, salary) =
(
Select * from)
with saldata as
(
Select 1 as empid, salary, 500 5000 as pf Union double all the
Select option 2, 10000,1000 like double pf
)
Select empid, salary saldata
) sl
where sl.empid = empsalary.empid
)
I use oracle 10g.
Help, please.
Thanks for posting creates table and test data.
The error message would have helped because it's pretty obvious that this is the problem:
Update table empsalary
*
ERROR on line 1:
ORA-00903: invalid table name
Just remove the word "table".
-
Several physical Tables in the single context
I have a scenario and need your input in how to solve this problem.
Let's say I have the schema from source database 2 S1 and S2 (on various Oracle Instances or a single instance). Both have the EMPLOYEE table. Now, I need to create a logical schema that maps to S1. EMPLOYEE and S2. USED, which is I should have access to the data of these two tables in the schema.
Is this possible. Maybe they both have different sets of records of EMPLOYEES for my warehouse I need a UNION of all the data. If I use the context then at any time I can only connect to 1 of these tables. What I want is that in 1 context both have access.
How can achieve us in ODI?>
If the topology would be something like:
Assuming that these are 2 scheme on a single database server
1 / I 1 physical database serverfix
2 / 2 physical diagrams (S1 and S2)
fix
3 / context? How many?
1
Figure 4 / logic? How many?
2
-
Help: apply different styles of Pará to several consecutive paragraphs using the script
Hi all
I need to apply different styles of Pará to several consecutive paragraphs using the script, something like this (found somewhere on the net):
myDoc = app.documents var [0];
mySel var = app.selection [0];
var myPStyle1 = "A";
var myPStyle2 = 'B ';.
you need to add 6 styles here:
var myPStyle3 = 'C ';
var myPStyle4 = "D";
var myPStyle5 = 'E ';
var myPStyle6 = 'F';
var myPStyle7 = "G";
var myPStyle8 = 'H ';
the last style is not necessary in the script?
apply style 1 paragraph 1
mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);
apply styles to the paragraphs after selection
style 2
mySel.paragraphs [-1] .insertionPoints [-1] .appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);
next style
mySel.paragraphs [-1] .insertionPoints [-1] .paragraphs [0] .insertionPoints [-1] .appliedParagrap hStyle = .nextStyle myDoc.paragraphStyles.item (myPStyle2);
I tried a lot, but could not find the way to extend the sequence
Sorry, no skills in the scripts still...
all styles have "Next Style" option enabled, but I can't use ' apply style, then next style "or object styles, because I need four different sequences of these paragraph styles:
A-B-C-D-E-F-G-H
A-B-D-E-G-H
A-C-D-F-G-H
A-D-G-H
and I don't really want to create special clones of the same style for each sequence (Keep It Simple, they say ).
I think that this can be done through four slightly adjusted scripts...
any suggestions would be greatly appreciated...
Sorry to be late to the party, I usually take up such things immediately.
How about this one?
1. no separate necessary script, it uses a small dialog box where you can choose what style to use. If I'm not mistaken, you can press a digit key on Windows to immediately select one of the items.
2. it works down in the paragraph in that your cursor is located. It has nothing to do with the blocks of text, even if - consecutive paragraphs within a story always ignore the text frames.
3. extensible: you can easily change the names of the styles in the table at the top of the page and the number of groups of style in the list.
var styleLists = [ [ "A", "B", "C", "D", "E", "F", "G", "H" ], [ "A", "B", "D", "E", "G", "H" ], [ "A", "C", "D", "F", "G", "H" ], [ "A", "D", "G", "H" ] ]; var radiobutts = []; styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true}); with (styleDialog) { with (dialogColumns.add()) { with (radiobuttonGroups.add()) { for (i=0; i
-
My verse ATT modem ({use of devices not apple wifi of this modem} is connected to the ATT line, Time Capsule (iPhones, Macs use the wifi of the time Capsule) and connect to the Uverse modem via ethernet.)
Both devices are set to the highest security and each uses separate passwords.
Non apple devices can collect data from iPhones or Mac using the time Capsule?
With a bit of work by someone who knows how to do such things, not Apple computers could read some files on the Mac if file sharing is configured on the network... devices non-Apple and... He knew the device passwords or administrator for Macs.
Mac could also play the files on other Macs if file sharing has been implemented and the device password or admin was known.
If you ask if a PC can read the files on the Time Capsule, the answer is Yes, without doubt, assuming that the PC knew the password of device for the time Capsule.
-
Hi all
New customer to CC, cc said constantly that he lost the functionality and to re - install, I have done this several times and used the CC cleaning tool. What's the point of having CC if you cannot use this?
Thanks for your reply, but I spent some time with support online yesterday which has managed to make me sort, I do not have a UPDATER AAM file, I could not delete the contents of the OOBE folder either, I had to rename the folder creative cloud. I was sent then the application manager - who was then updated to the new until I'm able to get apps. Long-term, but it worked. I tried the procedure you have above, just not all the steps worked for me. Thanks to the Member of the support staff who helped me, I have been literally pulling my hair out!
-
Any ideas how can I insert a pdf into word, by using the option object to insert. However, the pdf file that I want to insert text and annotated lines, but once inserted comments do not appear? any help would be greatly appreciated.
You will need to find a forum for MS Word, since it is the software you are trying to manipulate in the present. If you think that the treatment/creation of the PDF file plays a role, then you should ask in the forum for the software that you use to create the PDF file.
This forum is for a question about downloading and installing Adobe products test, so in all circumstances, your question does not fit in this forum.
-
Loding data using the database link.
Dear all,
I am new to Oracle GoldenGate...
How to use the database connection in GG?
below is the script...
I have a source table in the client machine (. 28) and I have Norman to laod given in the target computer (. 149) per database connection.
I run application GG in (. 28) and create the link of database called docqvoice_db alos.
I used below extracted code also
REPLICAT load6
Username, PASSWORD sh
ASSUMETARGETDEFS
CARD sh.products, TARGET products@docqvoice_db;
I have created the structure of the source in the target also.
I got the error
WARNING OGG - 01194 Oracle GoldenGate for Oracle, LOAD5.prm Capture: EXTRACT task LOAD6 added: Table PRODUCTS@DOCQVOICE_DB does not exist in the target database.
Please advice...
Thanks in advacne...
Amina Hussain
[email protected]
No cell + 91-9886006549Amina,
You have two choices. First choice, that's what you do, but your syntax is off. It should be:
REPLICAT load6
Sh@docqvoice_db username, PASSWORD sh
ASSUMETARGETDEFS
CARD sh.products, sh.products of the TARGET.Second choice is to create a view on the source using the link from the target database and map display just as in:
REPLICAT load6
Username, PASSWORD sh
ASSUMETARGETDEFS
CARD sh.products, sh.view_on_products of the TARGET.Good luck
-joe -
Creating external Tables using the EXECUTE IMMEDIATE in PL/SQL
Hi guys,.
I am trying to create an external Table using the EXECUTE IMMEDIATE in a procedure and I managed to compile and no errors were generated. But when I try to run it from sql using the exec command I get the following error:
------------------------------------------------------------------------
ERROR on line 5:
ORA-00911: invalid character
ORA-06512: at "GEO. TEST_DDL', line 4
ORA-06512: at line 5
-------------------------------------------------------------------------
I tried to check the whole statement to create the external table, but I can't find where is the error. Surprisingly, if I simply run the command table create external on sqlplus it works, but not a procedure.
If anyone can help with ideas or experience?
Geoffrey KossamiThe error means that there is an identifier somewhere that starts with a nonalphanumeric. This is a typical mistake of editing. A procedure compiles correctly is not of course because the underlying dynamic sql running is OK. Which of course only be resolved when you try to run it.
There is certainly a problem with the text you provide to be run as a piece of dynamic sql code. You should try to watch it with dbms_output and run this code in sqlplus. But your problem is with the code you run as dynamic PL/SQL, it is not itself compilable.
Jack
-
Generate the DDL to create the table in the database
Hi all
I want to create the new fact and Stadium as being under the statement:
(1) in the designer, access the models > Oracle BI Applications (folder) > (model) Oracle BI Applications > done (sub-model) step, right click on the WC_SAMPLE_FS data store and select duplicate the selection.
2) double-click the new data store, and then rename it. Name and resource name must match the name of the actual table. Alias can be the same or greater value easy to use.
(3) in the sub-tab of the columns, add all columns.
(4) repeat the same steps to create the fact Table by copying the data store WC_SAMPLE_F under the submodel of "facts".
(5) for the fact table, define the type of OLAP to "fact Table.
(6) generate the DDL to create the table in the database.
In step 6, I don't know where and how to generate the DDL to create the database table. Please help me. If you have another tutorial with screenshot, please share with me. Thank you.
Kind regards
Cong
Hi Cong,
Please see section 6.3 DDL generation of scripts in this link:
Working with the Designer of the common Format - 11g Release 1 (11.1.1)
I hope this helps.
Thank you!
Saran.
Maybe you are looking for
-
Partition MBR SD card unreadable...
My specs: My problem: I bought a Sandisk extreme more MicroSDHC 32 GB for my Raspberry Pi 3 new Then I installed Raspbian on it with this software (http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/). It worked, but I wanted to
-
Can I sync my calendar with my wife without a credit card
Can I sync my calendar from the iPad with my wife without a credit card
-
Is it safe to intall the oovoo via FB app?
Is it safe to intall the oovoo via FB app?
-
Why my gel of computeralways by playing games like farmville
My wife and I play a lot of games like farmville and frontiervilee and on.my Yes desk top just stop and.
-
HP officejet 4620 cannot connect to new router
Hello I recently got a new router and can print is more wireless. I know I would say somehow the printer to connect to the new router, but I don't know how to do this. It seems that just repeat the installation process fixed, but I can't find the d