Insert the record type
Hi allI created a table with two columns method. I am assigned two values to variable recordtype.
When inserting the record in the table, a compiler error is to be there.
Create table emp_info(empno number(5),ename varchar2(30));
DECLARE
l_rec emp_info%rowtype;
BEGIN
l_rec.empno := 101;
l_rec.ename := 'KING';
insert into emp_info(empno,ename)
values(l_rec);
commit;
END;
ERROR on line 11:ORA-06550: line 10, column 35:
PL/SQL: ORA-00947: not enough values
ORA-06550: line 10, column 1:
PL/SQL: SQL statement ignored
Can I insert with output Recordtype variables indicating the column names. Can someone help me?
Do not list of columns. Do not put brackets in the record variable:
SQL> DECLARE
2 l_rec emp_info%rowtype;
3 BEGIN
4 l_rec.empno := 101;
5 l_rec.ename := 'KING';
6 insert
7 into emp_info
8 values l_rec;
9 commit;
10 END;
11 /
PL/SQL procedure successfully completed.
SQL>
SY.
Tags: Database
Similar Questions
-
Dynamic SQL with in bulk in the record type
Oracle 10.2 g
I received this Tom
[http://asktom.oracle.com/pls/apex/f?p=100:11:0:NO:]
I'm able to do this without dynamic SQL, but my requirement is to do it in dynamic SQL
There is a work around in 11g, but can we do something in 10g?create table t1 ( x int, y int ); insert into t1 select rownum, rownum+1 from all_users where rownum <= 5; create table t2 ( x int, y int, z int ); declare type array is table of t1%rowtype; l_data array; begin select * bulk collect into l_data from t1; forall i in 1 .. l_data.count execute immediate 'insert into (select x, y from t2) values :x' using l_data(i); end; Error at line 1 ORA-06550: line 9, column 90: PLS-00457: expressions have to be of SQL types ORA-06550: line 9, column 20: PL/SQL: Statement ignored
Thank you
HESH.HESH wrote:
but following does not.
declare type array is table of t1%rowtype; l_data array; begin select * bulk collect into l_data from t1; forall i in 1 .. l_data.count execute immediate 'insert into (select x, y from t2) values :x' using l_data(i); end;
I want just a dynamic SQL code for the insert with FORALL statement would adopt as well as collections.
Doesn't make much sense.
Extract you the data from the SQL engine in the table of the record type. If the output data that cursor SQL must be read in the SQL engine and copied into the memory of PL/SQL engine.
Then, you send that VERY SAME DATA back to the SQL engine to be used by a SQL insert cursor.
Where is the logic behind the extraction of data from SQL in a PL/SQL table structure and then push this same structure table on the SQL engine database? What is the purpose to send data on a detour of underperforming and non-scalale through the PL/SQL engine?
You have any justification (technical or functional wise) to back up this absurd approach?
Why this can be achieved using a single SQL cursor that does both the choice (extraction) and (in bulk) insertion - using the plain old INSERT... SELECT structure?
And if the insert is variable, then what? Create a dynamic INSERT... SELECT cursor and execute it (using bind values). This simple... Right?
-
concatenate the fields of the record type
Hello
Is it possible to concatenate the fields of the record type?, example
I have a tabledeclare TYPE customer_sales_rectype IS RECORD (campo1 char(3), campo2 char(3), campo3 char(3)); TYPE ZZZ IS RECORD (kkk customer_sales_rectype); x customer_sales_rectype; begin x.campo1:='000'; x.campo2:='aaa'; x.campo3:='BBB'; end;
ID_REPORT NUMBER
My charly had more than 50 columns and unavoidable to concatenate the columns, example:
ID_LINE NUMBER
DT_FILE DATE Y
DS_LINE VARCHAR2(2048) Yselect column001 ,
I think that movement query result in a variable of type record that I would can insert in the table in the column is DS_LINE some transformatcion.
';' PV1,
COL2,
COL3
COL4,
';' PV2,....ETC
FROM MY TABLES
Is it possible without using COL1 | PV1. COL2. COL3 | COL4 | PV2... etc.
Thanks in advance
using 9.2.02It's pretty easy to write a function for this. Here's a 'coffee time ': implementation
create or replace function multi_concat (p_args sys.dbms_debug_vc2coll) return clob as rv clob; begin dbms_lob.createtemporary(rv, TRUE); for i in p_args.first .. p_args.last loop dbms_lob.writeappend(rv, length(p_args(i)), p_args(i)); end loop; return rv; end multi_concat; /
And the proof of coffee is in the dip of the ring:
SQL> select multi_concat ( sys.dbms_debug_vc2coll ( ('Red Fish', 'Blue Fish', 1, 'Fish',2,'Fish')) 2* from dual MULTI_CONCAT(SYS.DBMS_DEBUG_VC2COLL('REDFISH','BLUEFISH',1,'FISH',2,'FISH')) -------------------------------------------------------------------------------- Red FishBlue Fish1Fish2Fish SQL>
I add a member TO_STRING function to your type and use something like the above, implement.
You can also use the data dictionary to generate a string that connects the attributes of your type with the concatenation operator.
Cheers, APC
-
Hello experts.
create type emp2_obj is object
(
objno number,
objname varchar2(20),
objdept number
);
create type emp2_objarr is table of emp2_obj;and
type emp2_rec is record
(
recno number,
recname varchar2(20),
recdept number
);
create type emp2_recarr is table ofemp2_rec
;Objects and types of records are created similar and have the same similar object. Is it only advisable to use registration type if you use a collection in PL/SQL type... Please advice
user13328581 wrote:
the only reason why I ask is because he asked during an interview
-Objects and the types of records are created similar and have the same similar object. Is it only advisable to use registration type if you use a collection in PL/SQL type... Please advice
Not at all. You can use record types used with collection types outside. They are a group concept. If you want to group a set of values together (including fields), you can use a record. It may be convenient. You can send documents around proc and functions.
Be aware that the record types are limited to procedures, functions, anonymous blocks and packages (i.e. PL/SQL), while the types of objects are stored in the dictionary of data as a separate Oracle objects (they can also have methods, the records may not). Object types can be used in SQL, as said sol.beach types of records (outside of the intelligent pipeline situations) is for PL/SQL.
-
How to use the record type as a parameter IN PL/SQL procedure or package
Hi people,
I need help on the record as the OUT parameter type. I am able to get out a single line as a parameter, but not getting do not idea how to get a multi ranks as output parameter.
I have the code that works very well for a single line. Please see CODE1.
But when I try to get several lines, I'm failing to do. Please see the CODE2. I get the error of compilation as
Error report:
ORA-06550: line 11, column 35:
PLS-00487: Invalid reference to the variable "P_NAME.
ORA-06550: line 11, column 1:
PL/SQL: Statement ignored
06550 00000 - "line %s, column % s:\n%s".
* Cause: Usually a PL/SQL compilation error.
Any help or a sample execution of script would be really useful.
Thanks in advance.
YZ
--------------------------CODE1------------------------------------------
-------------------------Package Spec-------------------------------
CREATE OR REPLACE
PACKAGE xx_sample_pkg as
--
Xx_sample_table_rectype RECORD TYPE IS
(p_name varchar2 (40))
number of p_emp_id
);
PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);
END xx_sample_pkg;
------------------------------Package Body------------------------
create or replace
PACKAGE xx_sample_pkg AS BODY
--
PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS
BEGIN
SELECT ename, empno
IN xx_sample_rec1
FROM scott.emp
WHERE ename = 'SMITH ';.
END xx_sample_prc;
END xx_sample_pkg;
-------------------------------------------Execute----------------------
DECLARE
l_rec_type xx_sample_pkg.xx_sample_table_rectype;
BEGIN
dbms_output.put_line ('xx_sample_prc appeal');
xx_sample_pkg.xx_sample_prc (l_rec_type);
dbms_output.put_line ('YZ' | l_rec_type.p_name |') '|| l_rec_type.p_emp_id);
END;
---------------------------------------------------------------
-------------------------CODE2-------------------------------------------
-------------------------Package Spec-------------------------------
CREATE OR REPLACE
PACKAGE xx_sample_pkg as
--
Xx_sample_table_rectype RECORD TYPE IS
(p_name varchar2 (40))
number of p_emp_id
);
PROCEDURE xx_sample_prc (xx_sample_rec1, OUT xx_sample_table_rectype);
END xx_sample_pkg;
------------------------------Package Body------------------------
create or replace
PACKAGE xx_sample_pkg AS BODY
--
PROCEDURE xx_sample_prc (xx_sample_rec1 OUT xx_sample_table_rectype) IS
BEGIN
SELECT ename, empno
IN xx_sample_rec1
FROM scott.emp;
END xx_sample_prc;
END xx_sample_pkg;
-------------------------------------------Execute----------------------
DECLARE
l_rec_type xx_sample_pkg.xx_sample_table_rectype;
BEGIN
dbms_output.put_line ('xx_sample_prc appeal');
xx_sample_pkg.xx_sample_prc (l_rec_type);
for l_rec in 1.l_rec_type.p_name.count
loop
dbms_output.put_line ('YZ' | l_rec_type.p_name (l_rec) |) » '|| l_rec_type.p_emp_id (l_rec));
end loop;
end;
---------------------------------------------------------------
bb8c573a-6ca3-4d7c-90ed-e55c2df67201 wrote:
But now, my question would be why the record type could not be used? My understanding is missing some concept between use of type type array collection record vs. Please specify.
Do not confuse the folder with the collection.
SY.
-
Insert the record of one table to another with the help of the cursor
Help, please!
the tables are - 1. countries (country_id pk, country_name, region_id)
2A (country_id, country_name, region_id)
table data are
1 to 1
2 b 2
3 C 3
NULL d 4
5 e 5
6 f 6
7 g 7
-----------------------
Insert the record in the table a country table with the help of the cursor, insert all the non-null records.
This procedure does not correct result
-----------------------
create or replace
Amit procedure as
cursor c1 is select * from a;
RW a % rowtype;
Start
Open c1;
Fetch c1 into rw.
While (C1% found)
loop
insert into countries values (rw.country_id, rw.country_name, rw.region_id);
commit;
Fetch c1 into rw.
If rw.country_id is null then
Fetch c1 into rw.
end if;
end loop;
Close c1;
exception
while others then
dbms_output.put_line ('exception = name ' |) RW.country_name);
end;You don't need cursor at all;
create or replace procedure amit as begin insert into countries (Country_ID, Country_Name, Region_ID) (select a.Country_ID ,a.Country_Name ,a.Region_ID from a ); dbms_output.put_line('Rows inserted : ' || sql%rowcount); commit; end; /
-
Error in passing in the RECORD type in the API
Gurus,
Get the following error when I try and change from one type of RECORD in an API. I am in passage correctly?
Any help is appreciated.
Thank you
-Scott
Here is my error:
fnd_descr_flex_col_usage_pkg.load_row
*
ERROR at line 21:
ORA-06550: line 21, column 4:
PLS-00306: wrong number or types of arguments in the call to 'LOAD_ROW '.
ORA-06550: line 21, column 4:
PL/SQL: Statement ignored
Here is my anon block:
declare
Who_type RECORD TYPE IS
(
created_by NUMBER,
CREATION_DATE DATE,
last_updated_by NUMBER,
last_update_date DATE,
last_update_login NUMBER
);
v_who_type who_type;
date of v_sysdate;
Start
Select sysdate
in v_sysdate
Double;
v_who_type.created_by: = 0;
v_who_type. CREATION_DATE: = v_sysdate;
v_who_type.last_updated_by: = 0;
v_who_type.last_update_date: = v_sysdate;
v_who_type.last_update_login: = 0;
fnd_descr_flex_col_usage_pkg.load_row
(x_application_short_name = > 'SPL',)
x_descriptive_flexfield_name = > 'HR_LOCATIONS ',.
x_descriptive_flex_context_cod = > '441',.
x_application_column_name = > 'ATTRIBUTE5 ',.
x_who = > v_who_type,
x_end_user_column_name = > "District."
x_column_seq_num = > 10,
x_enabled_flag = > 'Y ',.
x_required_flag = > 'n',.
x_security_enabled_flag = > 'n',.
x_display_flag = > 'Y ',.
x_display_size = > 50,
x_maximum_description_len = > 50,
x_concatenation_description_le = > 25,
x_flex_value_set_name = > 50 characters,
x_range_code = > ",
x_default_type = > ",
x_default_value = > ",
x_runtime_property_function = > ",
x_srw_param = > ",
x_form_left_prompt = > "District."
x_form_above_prompt = > "District."
x_description = > ");
...sreese wrote:
Tubby,Im not asking for your help with this error. I want to define my own FILE type that mimics the call package so I can spend in my own variables.
Pretty sure I've described previously, there was a specific question with the answer that you do not understand?
>
The problem with this type of recording is that it contains all the 'who' columns that the application requires. When it is called from a package within the schema, the package has no difficulty arising from these data. When you call the package from an anon block, I have to pull my own values.
You did before declaring a LOCAL record type, then you need to reference to the PACKAGE of type folder, as I showed you... it makes you EF values even as you were in your first post.
I want to define the RECORD type of the manner in which it has been set to 'fnd_flex_loader_apis.who_type', but using my own variable and passing in the parameter. Make sense?
Thank you
ScottHope that helps.
-
HelloI have a requirement of the company, where I need to return a record type (OUT parameter) for environment call based on the given input value.
Suppose that if the value is correct and corresponding record is found in the table then the return values for this key entry. If matching record is found, then return the exception to the calling environment.
To do this, I created an example of test table and populated records.
create table plch_test(dept_id number,dept_name varchar2(50),cost_centre number); insert into plch_test values(10,'SALES',1010); insert into plch_test values(20,'FINANCE',2010); insert into plch_test values(30,'MKTG',3010); SQL> select * from plch_test; DEPT_ID DEPT_NAME COST_CENTRE ---------- -------------------------------------------------- ----------- 10 SALES 1010 20 FINANCE 2010 30 MKTG 3010
I wrote a simple block and gave a valid key dept_id (10 in this case) to display costcentre for this dept_id and dept_name I said tow types of records, one for valid record and another exception
SQL> DECLARE 2 TYPE rec_dept IS RECORD(dept_name varchar2(50),cc number); 3 l_rec_dept rec_dept; 4 TYPE rec_exception IS RECORD(err_code number,error_message varchar2(300)); 5 l_rec_exception rec_exception; 6 BEGIN 7 SELECT dept_name,cost_centre 8 INTO l_rec_dept 9 FROM plch_test 10 where dept_id=10; 11 dbms_output.put_line('DEPT_NAME'||' '||l_rec_dept.dept_name||' '||'COSTCENTRE'||' '||l_rec_dept.cc); 12 EXCEPTION WHEN NO_DATA_FOUND THEN 13 l_rec_exception.err_code:=sqlcode; 14 l_rec_exception.error_message:=sqlerrm; 15 dbms_output.put_line(l_rec_exception.err_code||' '||l_rec_exception.error_message); 16 END; 17 . SQL> / DEPT_NAME SALES COSTCENTRE 1010 PL/SQL procedure successfully completed. SQL>
Now for invalid dept_id and expose the message by using exception record type I stated.
SQL> ed Wrote file afiedt.buf 1 DECLARE 2 TYPE rec_dept IS RECORD(dept_name varchar2(50),cc number); 3 l_rec_dept rec_dept; 4 TYPE rec_exception IS RECORD(err_code number,error_message varchar2(300)); 5 l_rec_exception rec_exception; 6 BEGIN 7 SELECT dept_name,cost_centre 8 INTO l_rec_dept 9 FROM plch_test 10 where dept_id=40; --Invalid --data is not present 11 dbms_output.put_line('DEPT_NAME'||' '||l_rec_dept.dept_name||' '||'COSTCENTRE'||' '||l_rec_dept.cc); 12 EXCEPTION WHEN NO_DATA_FOUND THEN 13 l_rec_exception.err_code:=sqlcode; 14 l_rec_exception.error_message:=sqlerrm; 15 dbms_output.put_line(l_rec_exception.err_code||' '||l_rec_exception.error_message); 16* END; SQL> / 100 ORA-01403: no data found PL/SQL procedure successfully completed.
Now as you can see I need to include this point in a procedure with an input parameter and output must be a record types which will return
rec_dept if it becomes a key input valid or an exception if she meets a key not valid.
CREATE PROCEDURE test_prc IS(p_in_dept_id IN plch_test.dept_id,p_output ?????? DECLARE TYPE rec_dept IS RECORD(dept_name varchar2(50),cc number); l_rec_dept rec_dept; TYPE rec_exception IS RECORD(err_code number,error_message varchar2(300)); l_rec_exception rec_exception; BEGIN BEGIN SELECT dept_name,cost_centre INTO l_rec_dept FROM plch_test where dept_id=p_ind_dept_id; RETURN l_rec_dept; EXCEPTION WHEN NO_DATA_FOUND THEN l_rec_exception.err_code:=sqlcode; l_rec_exception.error_message:=sqlerrm; RETURN l_rec_exception; END; dbms_output.put_line('DEPT_NAME'||' '||l_rec_dept.dept_name||' '||'COSTCENTRE'||' '||l_rec_dept.cc); END;
Hope that the explanation above help in imposes the requirement
Kind regards
Claudy kotekal
Return a record which can mean two things is complicated; I'm not an experienced myself pl/sql developer, but this looks like a craft.
The idea of exceptions under Sir Thomas of Kyte, is that any treatment must be stopped; You should RAISE an exception to the appellant so that he can figure out what to do with it. What you are saying, this is an exception, but is not a little, cos it's okay, I'll just keep but I will go back to the appellant in any way, but the appellant shall include this registration type is - would it be a record representing a row of the table, or it might be an exception... yuck.
(a) is it really an exception
(b) what do you do with it? You he could log into a table, you could write to a file, you can display an error message on the screen
But really, it's weird to want to pass an exception as return value.
These are all considerations of design, not really anything to do with the pl/sql language in itself.
But hard, if you send a record type a successful being found, registration-based stick to it and don't use it to return a record; do not try to do double duty with her flipping something else. Just save the message put in a table, or print it to the console, or what you want to do with; but as I said, the most important decision is, is this really an exception. And is based on the data model and the expectations of cleanliness of the data etc.
Think about how you call built-in functions. If you send garbage to a built-in function it does not return successfully, leaving you to figure out whether he succeeded or not by inspecting the return value; It goes kaboom, something bad happened. That's what your function should do if something bad happens, that is to say, if you get an exception, it should probably go kaboom.
-
Bulk collect into the record type
Sorry for the stupid question - I do something really simple wrong here, but can not understand. I want to choose a few rows from a table in a cursor, then in bulk it collect in a folder. I'll possibly extended the record to include additional fields that I will select return of functions, but I can't get this simple test case to run...
PLS-00497 is the main error.
Thanks in advance.create table test ( id number primary key, val varchar2(20), something_else varchar2(20)); insert into test (id, val,something_else) values (1,'test1','else'); insert into test (id, val,something_else) values (2,'test2','else'); insert into test (id, val,something_else) values (3,'test3','else'); insert into test (id, val,something_else) values (4,'test4','else'); commit; SQL> declare 2 cursor test_cur is 3 (select id, val 4 from test); 5 6 type test_rt is record ( 7 id test.id%type, 8 val test.val%type); 9 10 test_rec test_rt; 11 12 begin 13 open test_cur; 14 loop 15 fetch test_cur bulk collect into test_rec limit 10; 16 null; 17 exit when test_rec.count = 0; 18 end loop; 19 close test_cur; 20 end; 21 / fetch test_cur bulk collect into test_rec limit 10; * ERROR at line 15: ORA-06550: line 15, column 38: PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list ORA-06550: line 17, column 21: PLS-00302: component 'COUNT' must be declared ORA-06550: line 17, column 2: PL/SQL: Statement ignored
You must declare an array based on your registration type.
DECLARE CURSOR test_cur IS SELECT id, val FROM test ; type test_rt IS record ( id test.id%type, val test.val%type); type test_rec_arr is table of test_rt index by pls_integer; test_rec test_rec_arr; BEGIN OPEN test_cur; LOOP FETCH test_cur bulk collect INTO test_rec limit 10; NULL; EXIT WHEN test_rec.count = 0; END LOOP; CLOSE test_cur; END; 31 / PL/SQL procedure successfully completed. Elapsed: 00:00:00.06 ME_XE?
Notice that the difference is...
type test_rec_arr is table of test_rt index by pls_integer; test_rec test_rec_arr;
-
Insert the record in the second table by making the trigger on the first table
I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
so I want to know what is the problem in my sql code.
Pls correct!
SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));
SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));
SQL > create the sequence myuser2_seq;
SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;
SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;
SQL > CREATE TRIGGER MYTRIGGER
2 AFTER INSERT ON myuser1
3 FOR EACH LINE
4 BEGIN
5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
1)
7 END;
8.
WARNING: Trigger created with compilation errors.JKMourya wrote:
I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
so I want to know what is the problem in my sql code.
Pls correct!SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));
SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));
SQL > create the sequence myuser2_seq;
SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;
SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;
SQL > CREATE TRIGGER MYTRIGGER
2 AFTER INSERT ON myuser1
3 FOR EACH LINE
4 BEGIN
5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
1)
7 END;
8.WARNING: Trigger created with compilation errors.
SELECT inside VALUES clause is NOT allowed.
do SELECT statements before the INSERT command -
Axis2 using generated proxy Java classes to insert the record in CRMOnDemand
Hello
I'm new to web service development. Currently, I am trying to build a java application to insert records opportunity in CRM on demand. I use Eclipse Galileo to create my application on Tomcat server. I've correctly coded the connect/disconnect through my java application scenario. Now the problem is that I don't know how the code to insert opportunity record in CRM by using classes Proxy generated by Apache Axis2.
I met a lot of code in this forum, but all are for versions Axis1.X. Axis2 generates a different kind of a class structure, I'm not able to find a way.
Please help me.Fill in data obj with the fields 'must '.
OpportunityData oppData = new OpportunityData();
oppData.setOpportunityName (testOppName);
oppData.setAccountId (testAccId);
oppData.setSalesStage ("qualified lead");complete list of Articles
ListOfOpportunityData listOfOppData = new ListOfOpportunityData();
listOfOppData.addOpportunity (oppData);Fill object Insert_Input
Entry OpportunityInsert_Input = new OpportunityInsert_Input();
input.setListOfOpportunity (listOfOppData);call the Stub
OpportunityStub stub = getOpportunityStub (params); ensure that the heel is configured with the session token.
OpportunityInsert_Output output = stub.opportunityInsert (input);
String oppIdCreated = output.getListOfOpportunity () .getOpportunity () [0] .getId ();Its ' the same for any record. For ex: insert account - AccountData, ListOfAccountData, AccountInsert_Input, AccountStub, etc..
Published by: 838315 on April 11, 2011 02:22
-
Insert the record into the database using hyperlink
My dev environment is DWCS3/MSAccess/ASP
I have a pretty simple site where I want to enable connected users to save documents to a Favorites page (the ID of the page they are on). For aesthetic reasons, for the most part, I want to be able to click on a hyperlink for the kickoff of the insert and allows their right to return to the page they were on the behavior of the FORM action.
Is this possible in ASP Classic? Does anyone have suggestions as to how I can do this?
Thank you very much.Since my main goal was to avoid putting a button on the page, I used the kind of a workaround plan b. I've created a save"link" which leads to a "success" - style page where they then click on a button to continue. I had passed the form hidden as variables to this page then used values built in behavior record insert to write the record in the Database when they click on "continue". Not the thing I wanted to do initially, but it works.
-
Limit the "Record Type" options in the section search for presentation of the action bar
Is it possible to limit the options of 'Record Type' in the 'Search' section in the disposition of the action bar for users specific role.
Thank you!Mahesh, if you uncheck the box to go to step 2 of the role that you would restrict access to these types of records in the section of the application and research in the action bar.
-
the associative arrays containing the record type, cannot be used first
I am having trouble with the declaration of an associative array containing the Types of records and iteration using FIRST and NEXT functions.
This problem of mine is only appear when I use that types of records, the FIRST and FOLLOWING operators work very well when you use the regular NUMBER.
Trying to get the first element of the array, I get: ORA-06550: line 22, column 40: PLS 00382: expression is of the wrong type
See the code snippet below. Anyone know if this can be done in PL/SQL?
-----------------------------------------------------------------------------------------
DECLARE
-Set the record structure that will contain information on a post
TYPE PostRec IS (RECORD
post_type VARCHAR2 (4) - maybe DEB/CRED
);
lr_charge_back_post PostRec;
TYPE post_table IS TABLE OF PostRec NOT NULL
INDEX BY VARCHAR2 (4);
assoc_posts post_table;
BEGIN
-lr_charge_back_post.post_type: = "asd";
assoc_posts('1').post_type: = '1';
lr_charge_back_post: = assoc_posts.first;
END;
/Returns the index, not the file FIRST:
SQL> declare 2 TYPE PostRec IS RECORD ( 3 post_type VARCHAR2(4) -- Can be DEB/CRED 4 ); 5 6 lr_charge_back_post varchar2(20); 7 TYPE post_table IS TABLE OF PostRec NOT NULL 8 INDEX BY VARCHAR2(4); 9 10 11 assoc_posts post_table; 12 13 BEGIN 14 15 16 --lr_charge_back_post.post_type := 'asd'; 17 assoc_posts('1').post_type := '1'; 18 19 lr_charge_back_post := assoc_posts.first; 20 dbms_output.put_line('idx='||lr_charge_back_post); 21 END; 22 / idx=1 PL/SQL procedure successfully completed. SQL> declare 2 TYPE PostRec IS RECORD ( 3 post_type VARCHAR2(4) -- Can be DEB/CRED 4 ); 5 6 lr_charge_back_post varchar2(20); 7 TYPE post_table IS TABLE OF PostRec NOT NULL 8 INDEX BY VARCHAR2(4); 9 10 11 assoc_posts post_table; 12 13 BEGIN 14 15 16 --lr_charge_back_post.post_type := 'asd'; 17 assoc_posts('idx').post_type := '1'; 18 lr_charge_back_post := assoc_posts.first; 19 dbms_output.put_line('idx='||lr_charge_back_post); 20 END; 21 / idx=idx PL/SQL procedure successfully completed.
Max
http://oracleitalia.WordPress.com -
Insert the record with the decimal string?
I want to insert a record with commas, as the below:
Is there a way we can insert commas in the table?INSERT INTO TABLEA(CITY) VALUES('ALBANY,NEWYORK,TROY')
This statement has been inserted
What is your question.
SQL> INSERT INTO TABLEA(CITY) VALUES('ALBANY,NEWYORK,TROY') ; 1 row created.
Maybe you are looking for
-
Any backup iPhone iCloud but it tells that my storage is full
Hi friends, I tried everything I could, but I gave up and decided to ask a question here... as you can see in the screenshot below, there is no backup of the iPhone. However it is said that the storage is full. How is that possible? It looks like a b
-
Opening can import metadata?
I have pictures 6 k + legend who all have had a string of text inserted in the field before the description of photographs. I could delete that text by exporting metadata, opening in text editing and do a "find and replace". I'm stuck but with import
-
Satellite P30-145 will not stay
Toshiba Satellite P30-145. Very well.My laptop will charge when turned off. As soon as I turn it on, it does not recognize that there is a power he goes and goes directly to the battery. If I take the battery and turn it on with PC network, it will s
-
Ignore an incoming call while the phone is locked.
Well, here's a strange... I noticed yesterday that there is no option to ignore a call if the screen is locked. You can just flick the icon upwards to meet. Or you can press the ringer switch, but it still vibrates until the call goes to voicemail. S
-
I'm trying to get my printer to make color
I'm trying to get my printer to make color, it does not seem to matter what I cannot have to print in color. I had problems with the printer and may have changed the settings and I have no idea how to solve this problem. I went to the printer setting