created a plsql table type
now I'm seeing its definition into a toad, but I am not able to see, although questioning the user_objects watch table type of desired table.query: select * from user_objects where object_name = 'DEF_NT_EMPLOYEES_DETAILS. '
result:
OBJECT_NAME | SUBOBJECT_NAME | OBJECT_ID. DATA_OBJECT_ID | OBJECT_TYPE | CREATED | LAST_DDL_TIME | TIMESTAMP | STATUS | TEMPORARY | GENERATED | SECONDARY
DEF_NT_EMPLOYEES_DETAILS | 32975 | TYPE OF | 2010-12-31 19:17:25 | 2010-12-31 19:20:54 | 2010-12 - 31:19:20:54 | VALID | N | N | N |
Oracle version: 9i
Help, please.
Concerning
Rahul
SELECT TEXT
FROM USER_SOURCE
WHERE TYPE LIKE 'TYPE%'
AND NAME = 'DEF_NT_EMPLOYEES_DETAILS'
ORDER BY TYPE,
LINE
/
SY.
Tags: Database
Similar Questions
-
How to retrieve the XML values in a plsql table type
Hello
I have an XML doc as below which is a Web Service response message.
<? XML version = "1.0" encoding = "UTF-8"? >
< SOAP - ENV:Envelope
xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/".
container = "http://www.w3.org/2001/XMLSchema".
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
< SOAP - ENV:Body >
< GetOrgInput xmlns = "http://www.example.org/ComplianceServices" >
< ProgramName > PgmA-Srsf < / ProgramName >
< > 800 ADSL ItemName < / ItemName >
< org > 923 < / org >
< org > 1163 < / org >
< org > 1103 < / org >
< / GetOrgInput >
< / SOAP - ENV:Body >
< / SOAP - ENV:Envelope >
The doc above, you could see that I have several occurrences of the element "Ent". I usually use the .extract and. getSTringVal() to retrieve the values as below.
l_string_variable: = p_response.doc.extract ('/ /'| p_name |) ' /Child::Text()',p_namespace).getStringVal();
But in this case if I do that, I get value as 92311631103. I need to get them in a table of the number type. Pls advice me on how to do this.
Thank you
PKVI'm guessing it's a bug fixed when Oracle 10.2 is released. I can reproduce your lack of results on 10.1.0.4 and as shown in my post above, it works correctly on 10.2.0.4.
Here is a modification of the script that shows what is happening that I have that debugging. (It took me a bit to realize the difference that it wasn't what I was expecting)
declare p_response_doc XMLTYPE; l_new_doc XMLTYPE; begin p_response_doc := XMLTYPE('
1163 1103 10.2.0.4 on this product
1163 1103 before loop1163 1103 After outputIt produces on 10.1.0.4
1163 1103 before loop 1163 1103 After outputAs you can see, Oracle is to detach (well technically not add) the space of default names to the nodes retrieved. To compensate, you need to change your loop to look like
FOR r_rec IN (SELECT extractvalue(value(t) , '/CompliantOrgs') val -- , 'xmlns="http://www.example.org/ComplianceServices"' ) val -- BULK COLLECT INTO l_nm_array FROM TABLE( XMLSequence( p_response_doc.extract('//CompliantOrgs','xmlns="http://www.example.org/ComplianceServices"') ) ) t ) LOOP
so extractValue does not expect the namespaces associated with the nodes.
I would suggest you document it so that you know why things break if you upgrade to 10.2 or later at some point in the future.
-
Error in initialization of multilevel nested table type
Hello
Database version: Oracle 11 g R2
I am creating a complex process I need to create complex nested table types and use them in code.
{code}
CREATE or REPLACE TYPE ws_data_compare_rt
AS AN OBJECT
(
external_web_service_id NUMBER (10),
service_code VARCHAR2 (30),
ws_bridging_id NUMBER (10),
ws_attribute_name VARCHAR2 (64).
ws_attribute_value VARCHAR2 (32767).
in_source_attribute VARCHAR2 (30),
in_source_value VARCHAR2 (32767).
comparison_rule VARCHAR2 (100)
);
CREATE or REPLACE TYPE ws_data_compare_tt IS TABLE OF THE ws_data_compare_rt;
CREATE or REPLACE TYPE ws_data_compare_master_rt
AS AN OBJECT
(
key_attribute_1 VARCHAR2 (30),
NUMBER of key_attribute1_value
key_attribute_2 VARCHAR2 (30),
NUMBER of key_attribute2_value
m_ws_data_compare_tt ws_data_compare_tt
);
/
CREATE or REPLACE TYPE ws_data_compare_master_tt IS TABLE OF THE ws_data_compare_master_rt;
{code}
The objects have been created successfully. However when I use it in my code, I need to initialize them, but I get an error for the variable of ws_data_compare_master_tt type initialization.
{code}
...
g_ws_data_compare_rt ws_data_compare_rt: = ws_data_compare_rt (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
g_ws_data_compare_tt ws_data_compare_tt: = ws_data_compare_tt();
g_ws_data_compare_master_rt ws_data_compare_master_rt: = ws_data_compare_master_rt (NULL, NULL, NULL, NULL, g_ws_data_compare_tt);
g_ws_data_compare_master_tt ws_data_compare_master_tt: = ws_data_compare_master_tt();
...
{code}
I'm unable to initialize the variable g_ws_data_compare_master_tt of type ws_data_compare_master_tt that I get the below error.
For PACKAGE BODY UTL compile errors. PKG_WS_UTIL
Error: PLS-00222: no function with name 'WS_DATA_COMPARE_MASTER_TT' does exist in this scope
Line: 28
Text: g_ws_data_compare_master_tt ws_data_compare_master_tt: = ws_data_compare_master_tt();
Error: PL/SQL: ignored element
Line: 28
Text: g_ws_data_compare_master_tt ws_data_compare_master_tt: = ws_data_compare_master_tt();
Can someone help me to find out what is the problem?
Thanks in advance.
Kind regards
Natarajan
Ah, I found the problem on my own. It was because of a bad statement similarly variable g_ws_data_compare_master_tt in a table in the specification of the package that was trouble. However I wonder the error returned Oracle was not fully exposed.
Kind regards
Natarajan
-
How to create composite indexes for Table Type
Hello
I have a file type my_rec
Type my_rec is RECORD)
Field1 varchar2 (100),
VARCHAR2 (100) Field2.
field3 varchar2 (100));
I declare a table type
Type my_tt is table of my_rec INDEX OF VARCHAR (200);
Here, instead of using varchar (200) can I said anyway that the values of Field1 and Field2 is a composite index?
Thank you
PaddyStill not able to solve my problem.
No need to simplify.
It's just not possible.1 index-by must be PLS_INTEGER, directory or VARCHAR2.
2 anchor statements cannot be used (I know this isn't what you're doing here).
3. you can not make a kind of self-reference on one of the fields in the index.An alternative is to make the big collect in a collection indexed by pls_integer, then go fill another collection with varchar2 key.
-
HII all... .i want to Know is it possible to give a table plsql as mode setting of output to another procedure... because if I do, I get an error "PLS-00201: identifier 'EMPTYPE' must be declared" I have creatred an emptype plsql table here is my code "»
create or replace procedure emp_pro (v_data in varchar2, v_empout out varchar2)
is
type emprectype is record
(
V_empno emp.empno%type,
v_ename emp.ename%type,
v_sal emp.sal%type,
v_job emp.job%type,
v_hiredate emp.hiredate%type,
v_comm emp.comm%type,
v_deptno emp.deptno%type
);
is of type emptype table of the emprectype
index of directory;
I have directory: = 0;
v_data varchar2 (1000): =' | 7369, SMITH, 800, CLERK, 17-DEC-80, 0: 20 | 7499, ALLEN, 1600, SELLER, 20-FEB-81 300, 30. 7521, WARD, 1250, SELLER, 22-FEB-81 500, 30. 7566, JONES, 2975, MANAGER, 02-APR-81, 0: 20 | 7654, MARTIN, 1250, SELLER, 28-SEP-91 100, 30. 7839, KING, 5000, PRESIDENT, 17-NOV-81, 0, 10. 7844, TURNER, 1500, SELLER, 08-SEP-81, 0: 30 | 7876, ADAMS, 1100, CLERK, 23-MAY-87, 0: 20 | 7900, JAMES, 950, CLERK, 03-DEC-81, 0: 30 | 7902, FORD, 3000, ANALYST, 03-DEC-81, 0: 20 | 7934, MILLER, 1300, CLERK, 23-JAN-82, 0: 10 |';
v_record varchar2 (100);
number of v_num1;
number of v_num2;
number of v_num3;
i the number;
number of j;
Meter number;
Start
Counter:=length(v_data)-length(Replace(v_data,'||')).
i: = 1;
loop
v_num1: = instr (v_data,'|) (', 1, i) + 2;
v_num2: = instr(v_data,'||',1,i+1)-2;
v_num3: = (InStr(v_data,'||',1,i+1))-(InStr(v_data,'||',1,i) + 2);
i: = i + 1;
v_record: = substr (v_data, v_num1, v_num3);
exit when I = counter + 1;
v_empout: = v_record;
-dbms_output.put_line (v_record);
end loop;
end emp_pro;
/
The type that you created is local to the procedure and is valid within this procedure.
To use the same type between procedures, you create a type that is visible in both procedures, for example by creating a type in the header of a packet.
-
How to get an output of a plsql table?
Hi Experts,
I have a package which, once executed gets data in a plsql table.
I want to store these data in a custom table.
How can I do this?
Thank you
PSThis?
SQL> create table temp 2 as 3 select * from emp where 1 = 2 4 / Table created. SQL> define p_empno=7788 SQL> SQL> declare 2 type emp_record is table of emp%rowtype; 3 4 emp_rec emp_record; 5 begin 6 select * bulk collect into emp_rec from emp where empno = &p_empno; 7 for i in 1 ..emp_rec.count loop 8 insert into temp values emp_rec(i); 9 end loop; 10 end; 11 / old 6: select * bulk collect into emp_rec from emp where empno = &p_empno; new 6: select * bulk collect into emp_rec from emp where empno = 7788; PL/SQL procedure successfully completed. SQL> SQL> select empno, ename from temp 2 / EMPNO ENAME ---------- ---------- 7788 SCOTT
-
May not know how to create a repeating table to PDF forms in InDesign
Hello!
It's all in the title. When I have my table with my header and footer, I can't understand how to create a repeating table for all users of my PDF files interactive.
Thank you for your help,
Will be
If you mean that you try to create a table with entries from forms that develops by creating new topics, I'm sorry to tell you that is not possible in InDesign. It is not yet possible in Acrobat. The only software that takes in charge who is LiveCycle ES Designer that creates some XFA forms, a type of form which becomes less support in the future.
-Dov
-
PLS-00201 in the table type declaration
Hello world
I want to create a line of some of my table type table type.
For example:
create or replace type tmp_Road is table of the XUXUEHAN.tbl_Road%rowtype
But I PLS-00201: identifier 'XUXUEHAN.tbl_Road' must be declared.
Where am I wrong? Thank you :-)
Hi, rp0428.
I read your page
But, the way I called the function package-"select * from table (text_x.get('1')); -It's like the way you did-' select * from table (pkg4.get_emp (20));
But the compiler tell me "types of data not valid." I don't really understand why. Please help me, thanks :-)
-
Not able to manage the value 'Table Type' in my procedure, humble need help here
Hi all
I am facing a problem with below pl/sql block. The time I run it it works fine, but when I run the procedure only from the exact values (hardcoded), it throws error as below.
[Error] Execution (38: 1): ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in the call to 'CREATE_ABNORMAL_BY_TRADER '.
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
What I understand problem is, I use a Type of table herewhich works very well with my Pl/Sql block, but do not work when I run the same procedure of the value hard-coded.
Please guide me how to handle this situation.
Pl/Sql block [works absolutely well]:
Declare
lv_eff_from_dt DATE;
lv_eff_to_date DATE;
v_severity_codes_wl param_tbl: = param_tbl();
lv_algo_id_wl sagedbo.alerts.algo_id%TYPE;
Begin
lv_eff_from_dt: = sage_utility.get_transaction_date('EFF_FROM_DATE'); -' 05-Aug-2013. '
lv_eff_to_date: = sage_utility.get_transaction_date('EFF_TO_DATE'); -' 04-sep-2013. '
lv_algo_id_wl: = sage_utility.get_code_values('ALERT_MODELS','GRAY_LIST'); -GLABNORMALv_severity_codes_wl: = sage_utility.get_multi_parameter_value(1,'SEVERITY_CODE_WL'); -4.5
SONARDBO.sage_generate_alert.create_abnormal_by_trader (lv_algo_id_wl, v_severity_codes_wl, lv_eff_from_dt, lv_eff_to_date, 'US');End;
Pl/Sql block [does not] (by the way the same values but hard)
Begin
SONARDBO.sage_generate_alert.create_abnormal_by_trader ('GLABNORMAL', '4', 5, 5 August 2013 ', ' 04-Sep-2013', 'US');
End;
Error PLS-00306: wrong number or types of arguments in the call to 'CREATE_ABNORMAL_BY_TRADER '.
I'm sorry that my question is not so generic, you cannot run on your computer. How should just guide me with the concept, I treat the values in table hardcodedly? (For testing of use)
Thank you very much
If your passage of type table, then you will need to run as below
Begin
SONARDBO.sage_generate_alert.create_abnormal_by_trader ("GLABNORMAL", param_tbl (' 4 ', ' 5'), August 5, 2013 ', ' 04-Sep-2013', 'US');
End
Means that you must call with the table type ("' hard coded values"). Here is the simple test. Take a look at this
SQL > CREATE or REPLACE the TYPE nt_tab IS TABLE OF VARCHAR2 (50);
2.
Type of creation.
SQL > CREATE OR REPLACE PROCEDURE test_proc (p_nttab nt_tab)
2 AS
3 v_nttab nt_tab: = p_nttab;
4 BEGIN
5 FOR me in 1.v_nttab. COUNTY
6 LOOP
7 DBMS_OUTPUT. Put_line (v_nttab (i));
8 END OF LOOP;
9 END;
10.
Created procedure.
-Perform the procedure with only one value of type table
SQL > EXEC test_proc (nt_tab ('KING'));
KING
PL/SQL procedure successfully completed.
-Run procedure with the multi-value table type
SQL > EXEC test_proc (nt_tab ('KING', 'AAAA', 'BBBB'));
KING
ABDELKADER
BENAMER
PL/SQL procedure successfully completed.
Post edited by: 000000
Post edited by: 000000
-
The assignment of values of Table type error
Hello
I'm trying to insert values for a Collection type, while doing that I am faced with an error.
My statement of collection type PFB and and assignment." PLS-00306: wrong number or types of arguments in call to 'XXSCP_AVL_CSP_SQR_O_TP' "
Object type:
Statement:TYPE XXSCP_AVL_CSP_SQR_O_TP AS OBJECT ( PLAN_ID NUMBER, SR_INSTANCE_ID NUMBER, INVENTORY_ITEM_ID NUMBER, BASE_ITEM_ID NUMBER, ITEM_NAME VARCHAR2(50), SUPPLIER_ID NUMBER, SUPPLIER_SITE_ID NUMBER, NORMAL_BUY_USAGE VARCHAR2(5), AVAILABLE_QUANTITY NUMBER , SPL_PEG_FLAG VARCHAR2(10), SQR_LINE_ID VARCHAR2(2000), SQR_NUMBER VARCHAR2(2000), SQR_MOQ NUMBER, BPA_PO_LINE_ID NUMBER, SUGG_BPA_NUMBER VARCHAR2(30), BPA_BUY_PRICE_BASIS VARCHAR2(10), BPA_LINE_NUM NUMBER, BPA_PO_LINE_LOC_ID NUMBER, BPA_CURRENCY_CODE VARCHAR2(10), BPA_PRICE NUMBER, BPA_PO_HEADER_ID NUMBER, BPA_EXPIRATION_DATE DATE, BPA_QUANTITY NUMBER, ORIG_AVAILABLE_QTY NUMBER ); Table type : TYPE XXSCP_AVL_CSP_SQR_C_TP AS TABLE OF XXSCP_AVL_CSP_SQR_O_TP;
Assignment to the body:l_tab_avl_csp_sqr XXSCP_AVL_CSP_SQR_C_TP := XXSCP_AVL_CSP_SQR_C_TP();
Can anyone help with this.l_tab_avl_csp_sqr.EXTEND(1); l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT) := XXSCP_AVL_CSP_SQR_O_TP(); l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).plan_id := l_tab_planorders (i).l_num_plan_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).sr_instance_id := l_tab_planorders (i).l_num_sr_instance_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).inventory_item_id := l_tab_planorders (i).l_num_inventory_item_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).base_item_id := l_tab_planorders (i).l_num_base_item_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).item_name := l_tab_planorders (i).l_chr_item_name; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).supplier_id := l_tab_planorders (i).l_num_supplier_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).supplier_site_id := l_tab_planorders (i).l_num_supplier_site_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).available_quantity := l_rec_pegged_list (j).remaining_aval_qty; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).spl_peg_flag := 'Y'; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).sqr_line_id := l_rec_pegged_list (j).sqr_line_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).sqr_number := l_rec_pegged_list (j).sqr_number; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).sqr_moq := l_rec_pegged_list (j).sqr_moq; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_po_line_id := l_rec_pegged_list (j).bpa_po_line_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).sugg_bpa_number := l_rec_pegged_list (j).bpa_number; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_buy_price_basis := l_rec_pegged_list (j).bpb_type; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_line_num := l_rec_pegged_list (j).bpa_line_num; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_po_line_loc_id := l_rec_pegged_list (j).bpa_lloc_id; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_currency_code := l_rec_pegged_list (j).bpa_curr_code; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_price := l_rec_pegged_list (j).bpa_price; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_expiration_date := l_rec_pegged_list (j).bpa_expiration_date ; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).bpa_quantity := l_rec_pegged_list (j).bpa_quantity ; l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT).orig_available_qty := l_rec_pegged_list (j).remaining_aval_qty ;
Thanks in advance,
Rakesh
Published by: Vincent Rakesh on April 24, 2013 12:18 AMYou must add a vacuum-arg set constructor to your type to use, user l_tab_avl_csp_sqr (l_tab_avl_csp_sqr. "COUNTY): = XXSCP_AVL_CSP_SQR_O_TP();
create or replace TYPE XXSCP_AVL_CSP_SQR_O_TP AS OBJECT ( PLAN_ID NUMBER, SR_INSTANCE_ID NUMBER, INVENTORY_ITEM_ID NUMBER, BASE_ITEM_ID NUMBER, ITEM_NAME VARCHAR2(50), SUPPLIER_ID NUMBER, SUPPLIER_SITE_ID NUMBER, NORMAL_BUY_USAGE VARCHAR2(5), AVAILABLE_QUANTITY NUMBER , SPL_PEG_FLAG VARCHAR2(10), SQR_LINE_ID VARCHAR2(2000), SQR_NUMBER VARCHAR2(2000), SQR_MOQ NUMBER, BPA_PO_LINE_ID NUMBER, SUGG_BPA_NUMBER VARCHAR2(30), BPA_BUY_PRICE_BASIS VARCHAR2(10), BPA_LINE_NUM NUMBER, BPA_PO_LINE_LOC_ID NUMBER, BPA_CURRENCY_CODE VARCHAR2(10), BPA_PRICE NUMBER, BPA_PO_HEADER_ID NUMBER, BPA_EXPIRATION_DATE DATE, BPA_QUANTITY NUMBER, ORIG_AVAILABLE_QTY NUMBER, /* Constructor */ constructor function XXSCP_AVL_CSP_SQR_O_TP return self as result ); create or replace TYPE body XXSCP_AVL_CSP_SQR_O_TP AS /* Constructor */ constructor function XXSCP_AVL_CSP_SQR_O_TP return self as result is begin return; end; end;
You can also assign your attributes that you construct your instance:
l_tab_avl_csp_sqr.EXTEND(1); l_tab_avl_csp_sqr(l_tab_avl_csp_sqr.COUNT) := new XXSCP_AVL_CSP_SQR_O_TP( l_tab_planorders (i).l_num_plan_id, l_tab_planorders (i).l_num_sr_instance_id. l_tab_planorders (i).l_num_inventory_item_id, l_tab_planorders (i).l_num_base_item_id, l_tab_planorders (i).l_chr_item_name, l_tab_planorders (i).l_num_supplier_id, l_tab_planorders (i).l_num_supplier_site_id, l_rec_pegged_list (j).remaining_aval_qty, 'Y', l_rec_pegged_list (j).sqr_line_id, l_rec_pegged_list (j).sqr_number, l_rec_pegged_list (j).sqr_moq, l_rec_pegged_list (j).bpa_po_line_id, l_rec_pegged_list (j).bpa_number, l_rec_pegged_list (j).bpb_type, l_rec_pegged_list (j).bpa_line_num, l_rec_pegged_list (j).bpa_lloc_id, l_rec_pegged_list (j).bpa_curr_code, l_rec_pegged_list (j).bpa_price, l_rec_pegged_list (j).bpa_expiration_date, l_rec_pegged_list (j).bpa_quantity, l_rec_pegged_list (j).remaining_aval_qty );
Gerard
Published by: gaverill on April 23, 2013 12:12
-
Creating the external Table - length fixed
I was responsible for importing data in fixed length of a text file in an oracle table. To do this, I create an external Table. I'm finally at the point where the script works to create the table, but when I run a statement select for ' select * from external table ', I have received only a single line/record (the first line of the text file).
This is what the script looks like:
CREATE TABLE EXT_MD
(
AR_SID VARCHAR2 (12),
AR_SSN VARCHAR2 (4).
AR_LASTNAME VARCHAR2 (29),
AR_FIRSTNAME VARCHAR2 (27),
AR_RACE VARCHAR2 (1).
DATE OF AR_DOB,
NA_LASTNAME VARCHAR2 (29),
NA_FIRSTNAME VARCHAR2 (27),
NA_SEX VARCHAR2 (1).
ID_FBI_ID VARCHAR2 (9).
AR_ARR_DATE VARCHAR (26).
AR_PRIMARY_CHARGE VARCHAR2 (35),
DEM_STREET_NBR VARCHAR2 (5).
DEM_STREET_NAM VARCHAR2 (10),
DEM_STREET_SFX VARCHAR2 (2),
DEM_STREET_DIR VARCHAR2 (2),
DEM_CITY VARCHAR2 (10),
DEM_STATE VARCHAR2 (2),
DEM_ZIP VARCHAR2 (5).
AR_TRACK_NUM VARCHAR2 (12),
DEM_ORI VARCHAR2 (9)
)
EXTERNAL ORGANIZATION
(TYPE ORACLE_LOADER
THE DEFAULT DIRECTORY EXT_DIR
ACCESS SETTINGS
(
RECORDS DELIMITED BY NEWLINE
BADFILE EXT_DIR: 'ext_bag.bad'
EXT_DIR LOG file: 'ext_good.log'
FIELDS
MISSING FIELD VALUES ARE NULL
(
AR_SID(1:12) CHAR (12),
AR_SSN(13:16) CHAR (4),
AR_LASTNAME(17:45) TANK (29),
AR_FIRSTNAME(46:72) TANK (27),
AR_RACE(73:73) CHAR (1),
AR_DOB(74:83) CHAR(10) DATE_FORMAT DATE MASK "YYYY-MM-DD"
NA_LASTNAME(84:112) TANK (29),
NA_FIRSTNAME(113:139) TANK (27),
NA_SEX(140:140) CHAR (1),
ID_FBI_ID(141:149) CHAR(9),
AR_ARR_DATE(150:175) TANK (26),
AR_PRIMARY_CHARGE(176:210) CHAR (35),
DEM_STREET_NBR(211:215) CHAR (5),
DEM_STREET_NAM(216:225) CHAR(10),
DEM_STREET_SFX(226:227) CHAR (2),
DEM_STREET_DIR(228:229) CHAR (2),
DEM_CITY(230:239) CHAR(10),
DEM_STATE(240:241) CHAR (2),
DEM_ZIP(242:246) CHAR (5),
AR_TRACK_NUM(247:258) CHAR (12),
DEM_ORI(259:267) TANK (9)
)
)
LOCATION ("daily.txt")
)
REJECT LIMIT UNLIMITED;
That's what part of the log file looks like:
For table EXT_MD field definitions
Record format DELIMITED BY newline
Data in file have same "endianness" as platform
Rows with all null fields are accepted
Fields of the Data Source:
AR_SID TANK (12)
Position of the record (1: 12)
Cut the whites of right
AR_SSN CHAR (4)
Position of the record (13: 16)
Cut the whites of right
etc (shows the rest of the columns with similar message) then at the end of the log file
Transformations of columns
ROWID
Date table EXT_MD Cache statistics
Maximum size: 1000
Entries: 1
Hits: 0
Rate: 0
Assistance or management will most certainly be appreciated. Thanks in advance.
Published by: zephyr223 on March 25, 2013 10:47Hello
Which characters do you have in your data file that define the "line break".Oracle documentation:
If DELIMITED BY NEWLINE is specified, then the actual value used is platform-specific. On UNIX platforms, NEWLINE is assumed to be "\n". On Windows NT, NEWLINE is assumed to be "\r\n".
you have these 'hidden' characters in your folder or are they something else?
Kind regards
Harry -
How to recover data from plsql table in the BI publisher data model
Hi all
I created a data model for XML editor report. In the data model I m get plsql table data. for this I created a package with a function in the pipeline. I am able to run sql in sql developer. But if I run the program at the same time, then I got error like "java.sql.SQLSyntaxErrorException: ORA-00904:"XXXXX": invalid identifier.
I used the same settings in the data model and simultaneous program...
Please tell me what to do...
Thanks in advance...
Kind regards
DossI think P_ORG_ID is the parameter
so use:P_ORG_ID
-Add
also why not use simple sql query?Published by: Alexandr Sep 14, 2012 04:48
-
How triggers can be created in the table?
Hi all
How triggers can be created in the table?
is 12 or as far as we can?There is no technical limit to the number of triggers you set (or, at least, not one that any rational person has never touched). He usually would not make sense to have more than one trigger of a given type on a particular table, even if you can come up with situations where you can have multiple triggers of the same type on a single table.
Normally, when people ask this question, it is because someone (foolishly) he asked in an interview. Frequently, the interviewer is trying to determine if you know how many types of triggers there is no if you know if there are some esoteric limit on the number of triggers.
Justin
-
using plsql table and ref cursor in oracle's 10 g
Hi all
Can someone give me an example of a scenario where we need to create a form manually based on a stored database procedure.
And in this process, I created a pl/sql table and a Ref cursor at the database level.
CREATE OR REPLACE PACKAGE SCOTT. TYPE BONUS_PKG IS bonus_rec
IS (RECORD
EmpNo bonus_EMP.empno%TYPE,
Ename bonus_EMP.ename%TYPE,
employment bonus_EMP.job%TYPE,
SAL bonus_EMP.sal%TYPE,
Comm bonus_EMP.comm%TYPE);
TYPE b_cursor IS REF CURSOR RETURN bonus_rec;
TYPE bontab IS TABLE OF bonus_rec INDEX DIRECTORY.
PROCEDURE bonus_refcur (bonus_data IN OUT b_cursor);
PROCEDURE bonus_query (bonus_data IN OUT bontab);
END bonus_pkg;
CREATE OR REPLACE PACKAGE BODY SCOTT. BONUS_PKG IS
PROCEDURE bonus_query (bonus_data IN OUT bontab) IS
II NUMBER;
CURSOR bonselect IS
SELECT empno, ename, job, sal, comm bonus_EMP ORDER BY empno;
BEGIN
OPEN bonselect.
II: = 1;
LOOP
Look FOR bonselect IN
.EmpNo bonus_data (ii),
.ename bonus_data (ii),
.job bonus_data (ii),
.Sal bonus_data (ii),
.comm bonus_data (ii);
EXIT WHEN bonselect % NOTFOUND;
II: = ii + 1;
END LOOP;
END bonus_query;
PROCEDURE bonus_refcur (bonus_data IN OUT b_cursor) IS
BEGIN
Bonus_data OPEN to SELECT empno, ename, job, sal, comm bonus_EMP ORDER BY empno;
END bonus_refcur;
END bonus_pkg;
I want to fill in the data in the forms manually is not using Forms data block Wizard and by program.
Please answer...Can someone give me an example of a scenario where we need to create a form manually based on a stored database procedure.
In general, you will use a block of proceedings based when you have a collection of data from several tables presented in a form and your username must be able to update the information displayed.
In your sample code, looks like you are using Oracle Support document "Melting a block on a Stored Procedure - examples of Code [ID 66887.1]". If this is the case, continue to follow the document - it guides you through all the steps. There is no need to manually configure things that the data block Wizard will work for you!
I want to fill in the data in the forms manually is not using Forms data block Wizard and by program.
Why? Let the wizard block configuration data of your block based on a procedure for you. There is no need to manually browse the data! I did what you're trying, and it's more work needed. Leave forms to do the work for you. :)
If you absolutely have to do things manually, I recommend that you use the PROCEDURE bonus_query (bonus_data IN OUT bontab) instead of bonus_refcur (bonus_data IN OUT b_cursor) . Then, in your code create a variable of type BONTAB, and then call the bonus_query procedure. Then, it's a simple case of a loop in the table of records returned by the bonus_query procedure. For example:
DECLARE t_bonus bonus_pkb.bontab; BEGIN bonus_pkg.bonus_query(t_bonus); FOR i in 1 .. t_bonus.count LOOP :YOUR_BLOCK.EMPLOYEE_NUMBER := t_bonus(i).empno; :YOUR_BLOCK.EMPLOYEE_NAME := t_bonus(i).ename; :YOUR_BLOCK.EMPLOYEE_JOB := t_bonus(i).job; :YOUR_BLOCK.EMPLOYEE_SALARY := t_bonus(i).sal; :YOUR_BLOCK.EMPLOYEE_COMMISSION := t_bonus(i).comm; END LOOP; END;
This code example shows the basics, but as is the sample code - you will need to adapt to your situation.
Also, I highly recommend that you look at the article inol listed. It is a very thorough debate on the REF CURSOR. If you have set up using a procedure based on the data source - it is more effective to spend the record table to your form that it must pass a ref cursor Using a ref cursor, you might as well just using a standard called cursor and loops on your named cursor. The effect is the same (a line returned at the same time creating lots of network traffic). Using the table of records is more efficient because the data set is returned if the network traffic is reduced.
Hope this helps,
Craig B-)If someone useful or appropriate, please mark accordingly.
-
How the parameter of the procedure with the default table type?
Hello!
How the parameter of the procedure with the default table type?
For example:type varchar2lType is table of varchar2(50) index by binary_integer;
Published by: bullbil on 16.01.2012 06:35create or replace procedure test1 ( s1 varchar2(50) sa2 Varchar2Type ) as begin dbms_output.put_line('yyxxyyy!'); end; /
If he should really be an associative array for some reason any (can't think why, but just for fun...) you could declare a dummy array in the packet header and specify as the default:
create or replace package wr_test as type varchar2ltype is table of varchar2(50) index by pls_integer; g_dflt_varchar2l_tab varchar2ltype; procedure testit ( p_testarray varchar2ltype default g_dflt_varchar2l_tab ); end wr_test; create or replace package body wr_test as procedure testit ( p_testarray varchar2ltype default g_dflt_varchar2l_tab ) is begin dbms_output.put_line('p_testarray contains ' || p_testarray.count || ' elements'); end testit; end wr_test;
It is a bit of a hack, because it relies on a global variable that is exposed. A more orderly approach would overload the procedure so that a version does not have the table and another argument:
create or replace package wr_test as type varchar2ltype is table of varchar2(50) index by pls_integer; procedure testit; procedure testit ( p_testarray varchar2ltype ); end wr_test; create or replace package body wr_test as procedure testit is v_default_array varchar2ltype; begin testit(v_default_array); end testit; procedure testit ( p_testarray varchar2ltype ) is begin dbms_output.put_line('p_testarray contains ' || p_testarray.count || ' elements'); end testit; end wr_test;
Maybe you are looking for
-
I've always had my address books in the same window that I compose. This is particularly useful when sending to groups of people. Yesterday, I accidentally erased it by pushing something. It should be an easy solution to replace, right?
-
Strange noise on my Satellite L50-B-NV
Hi all I have a Toshiba L-50 b-1-NV and the case constantly makes a strange noise, as if the load continuously. Sounds like something streaks, I think it's the hard drive, but I'm not sure, because the computer is relatively new (I got it 1 month). A
-
Hello I forgot my hp mini 110-1145nr laptop bios password that I have very important data I have try it 3 times now its stopped with error CNU938516w Please help me
-
Hello I am trying to determine the frequency of an analog signal (pulse tachometer) in order to calculate the number of LAPS and integrate it into a LabVIEW program. I tried to write a "dummy" program before I it implement the complete system of LabV
-
my printer hologram of stopped for some unknown reason, and I can ' t get "er's"