Forms :: Dynamic List From One Table And Insert Into Another?
Jan 10, 2013
Im facing some issues with my form, getting stuck... prob desc below : I have Table A which has columns; car_year, car_type, line_num, line_text. Table B has country, car_year, car_type, line_num, data_entry_amt.
Table A contains data which gets updated once every year only. Contains what year model is the car, what type of car it is.. Line_num has numbers starting from 1 which indicates the different part number and line_text has description for that line_num. eg :
2010 Toyota 1 Windshield
2010 Toyota 2 Door
2010 Toyota 3 Tire
2010 BMW 1 Windshield
2010 BMW 2 Door
2010 BMW 3 Tire
2010 BMW 4 Rear_mirror
Table B contains specific data related to table A, Contains country where car details n prices are, car_year, car_type, line_num, and amount($) for that part. for example :
Australia 2010 Toyota 1 400.50
Australia 2010 Toyota 2 200.40
Australia 2010 Toyota 3 308.25
So in year 2010, in Australia, Toyota's Door was sold at $200.40 Now, Table A will have similar data for this year and users will enter data for table B throughout this year. I tried master-detail form for this but it doesnt work. Because every year line_num change in table A and therefore cant implement a fixed number or rows on the form for amount for table B.
How to use dynamic listing but im not familiar with it. So how i should go about doing this. My form has structure has below :
I want to create two list items. one is for deptno and another is for empno in a single form.
Based on the selected deptno value from first list item i want to populate corresponding empno from second list item. I tried with the fallowing code, it's work fine but the second list is not clears with the existing empno's.
Code for Deptno List item
declare cursor c is select deptno from dept; cnt number := 1; begin clear_list('LI_DEPTNO');
[Code]...
Code for Empno list item in when_list_changed trigger for deptno list item
declare cursor c is select empno from emp where deptno = :LI_DEPTNO; cnt number := 1; begin it_id := Find_Item('LI_EMPNO'); clear_list(it_id); for i in c loop add_list_element('LI_EMPNO',cnt,i.empno,i.empno); cnt := cnt + 1; end loop; end;
i have created a small table which contains only name of cities.On form level i want to create a dynamic list of the name of these cities just by clicking on the textbox without doing any hardcoding.
I trying to create a procedure that could update one or more different table into clob data - but only those tables that contain your search (indexed) word.
I have a 3 tables: item, common_lookup, member
> CREATE INDEX i_item_barcode ON item (item_barcode) INDEXTYPE IS ctxsys.context; CREATE INDEX i_item_title ON item (item_title) INDEXTYPE IS ctxsys.context; CREATE INDEX i_item_subtitle ON item (item_subtitle) INDEXTYPE IS ctxsys.context; CREATE INDEX i_common_lookup_meaning ON common_lookup (common_lookup_meaning) INDEXTYPE IS ctxsys.context; CREATE INDEX i_account_number ON member (account_number) INDEXTYPE IS ctxsys.context;
[Code]....
Now is the question.. If it possible to create the procedure search_execute which can add data depending on subbmited parameters ? If it possible, can You give me an example (dbms_output/update_clob), for search_execute to recive something like that:
> search_execute ('Wars', item, item_title) > >
select * from clob data : 1 1068 ASIN: B00003CX5P 1014 Star Wars - Episode I The Phantom Menace (CLOB) (BLOB) PG MPAA 22-mar-2005 3 16-lut-2012 17:31:55 3 16-lut-2012 17:31:55 2 1069 ASIN: B00006HBUJ 1014 Star Wars - Episode II Attack of the Clones (CLOB) (BLOB) PG MPAA 22-mar-2005 3 16-lut-
[Code]....
I try write something like this (it is not compile - and I know where is mistake, I tried to figure it out in several different ways - This is just my way of thinking expression) : > CREATE OR REPLACE PROCEDURE search_execute (v_text IN VARCHAR2, v_column_name IN VARCHAR2, v_table_name IN VARCHAR2) IS v_clob CLOB; v_tmp_clob CLOB; CURSOR c1 IS (SELECT * FROM v_table_name WHERE contains (v_column_name, v_text) > 0); CURSOR c2 IS (SELECT column_name FROM user_tab_cols WHERE table_name = v_table_name); BEGIN
i used sql loader to import data from csv file to my db.but every time the columns places are changed.o i need dynamic way to insert data into correct column in the table.
in csv file contains column name and i insert this data to temp table, after that i want to read data over column name.also i read the column names from (All_Tab_Columns) to make combination of column name between temp table and All_Tab_Columns table to insert data to right place...
the code works "fine" here but the xml in the fb_xml table is not EXECUTED it simply escaped by oracle , i know i should add something so that the XML have to execute and generate.
When a user selects a Plan Type (Parent Select list) Plan codes (Child select list) to be filtered, working OK. When a plan code is selected I need to do conditional display of regions. Example: Plan code = A then display Region A Plan code = B then display Region B etc.
I have a DA on Plan code select list but it's not working as it's being a cascaded (child) select list and the 'Change' event is already fired when I selected the Plan type, I also tried with other event options with no success.
We get data from our customers which we load into temporary tables.The goal is to consolidate this data into one single table.
Following are the rules:
1) final table should have all the columns from all the tables. If there are common column(s) then add only one column with that name.
2) the join would be based on all the common columns
3) if there is a common row, we merge the row into one (example, the row with DOMAIN = ACME.COM)
4) There could be 'N' number of tables
Following is the most realistic data.
1) T1/T2/T3 has the sample data which cover most of our test cases
2) We are expected to transform the data from T1/T2/T3 as depicted in table T4.
3) we might have more than 3 tables in our production environment, so the query should work for N tables.
4) I have given the explanation of how each row should be derived to be inserted in T4
5) the only information we have to work with is the TABLE_NAME(s) and its metadata from USER_TAB_COLUMNS
DROP TABLE T1; DROP TABLE T2; DROP TABLE T3; DROP TABLE T4;
[code].....
Explanation for each row:
row1) This row comes from T1 and T2 (not T3 because HOSTNAME would not match) row2) This row comes from T1 and T3 (not T2 because HOSTNAME would not match) row3) This row comes from T1 and T3 row4) This row comes from T2 and T3 row5) This row comes from T3
i'm working in an Oracle 10g database on an IBM AIX server.
I have 3 tables (tables A, B and C).
Table A has columns -- product, rate and expiration date.
Table B has columns -- product, rate and deductible.
Table C has columns -- product, rider, gender, age and rate.
I also have a Master table which is used to store the data from Tables A, B and C via the insert statement.
I'm trying to create a dynamic SQL insert statement using a shell script to insert data from the columns in Tables A, B and C into my Master table. Master table does contains all columns from Tables A, B and C, although a column name could be spelled differently. For example, Master table contains a column named "deduct", while Table B has the same column spelled as "deductible".
I build the dynamic query using a for loop in my shell script (see below).
The problem is that i can't get the correct columns in the Master table in the dynamic SQL for the insert because depending on the table i'm selection from, the columns are different. So how do i get the correct columns in the SQL for the Master table?
Example Shell Script
--Archive_Rates.txt contains: Table A, Table B, Table C (but the next time my process runs, Archive_Rates might contain Table D, Table E and Table F -- each which have different column...but all columns are still in the Master table)
for tbl in `more Archive_Rates.txt` do echo 'BEGIN WORK; ' > rc1.sql echo ' ' >> rc1.sql echo 'insert into Master' >> rc1.sql echo '(prod, rate, rate_exp) ' >> rc1.sql
DECLARE CURSOR GRP IS SELECT RowNum rn, Letter_Group_ID||'-'||A_Desc AName,Letter_Group_ID FROM Hrs_Group; BEGIN Clear_list('Letter_Group_ID'); FOR I IN GRP LOOP Add_List_Element('Letter_Group_ID',I.rn,I.AName,I.Letter_Group_ID); end loop; END;
FRM-30351: No list elements defined for list item.
how should i populate table column heading in list items of forms? I've create lov to select the column, then i have 10 separate list items. once i select the table from lov then list item should get populated with selected table column.
Table Structure: Name of Table: info Column: ID, Name, Cell,Cell1,Ref
i want to insert these values in a table through ref (key next item). ----------------------------------------------------------- Key next Item Triger DECLARE A NUMBER; B NUMBER; BEGIN SELECT :CELL,:CELL1 INTO A,B FROM DUAL; [code]....... ------------------------------------------------------- but when i press enter(ref Key_next_item) it will return error:
FRM-40735: KEY_NEXT_ITEM RAISED UNHANLEDED EXCEPTION ERROR: ORA 40102
i have a tabular form select * from emp and i want to create table and store there data in goup select empono,sal,com group by dept i want to insert in another table.
how i insert the data in table by forms front end and then update also when again click the button or any change occur in form insert into a select empono,sal,com group by dept
I am just making a audit table as well. i have learnt the basics from here URL.....
My problem is that after inserting into audit table if i issue commit command then the table + unsaved data present on the form is also saved.What i want is that i issue a command which save only inserted record in audit table, and should NOT save data present on the data entry form. (which will be saved later by other method/button).
i have emp table of 5 columns empno,ename,dept,sal,edit_timing(edit timing datatype is timestamp).and my form contains empno,ename,dept,sal. is if i insert a record into forms it automatically insert the date and timing into edit_timing columns.
1.Insert all data from global table to base table. 2.Update all data (that means retrieved all data from base table to global table and update this data). Question: How to Insert and Update from Global temporary table ??
I would like to UPDATE the columns p1 and p2 of my table student (studentid:pk,name,p1,p2,...) for a given studentid.and I have a when-button-pressed trigger with this
UPDATE student SET student.p1=:validation.proj1, student.p2=:validation.proj2 where UPPER(student.studentid)=UPPER(:validation.studentid);commit_form;
when I run my form with a correct studentid, I got this error: FRM-40508: ORACLE error: UNABLE to INSERT record
but it is cworking correctly in sqlplus; and I have all priveligies.
Suppose There are Four options in a Radio Group. From this whichever option I select using the Mouse that option must be Inserted in the Database table field.
How to do this Using Radio Buttons.
Also If I want to select more than One Option Then I use Check Box. For this Also When I select two or three options simultaneously then these values must be Inserted in the Database Table Fields.
My Form consists two Hierarchical trees. When I select a node from first tree and I press Move Right (>>) Button the selected node should move to the second tree. Similarly when I select a node from second tree and press move Left button(<<) it should move to the first tree.
I also want to know want to insert values Into New Table using node values from The Displayed Hierarchical Tree. How to retrieve values using populate_Group_from_tree and insert into table.
I am trying to execute dynamic SQL in Stored Function and I don't know how to do this.
Explanation:
In the function I am calling pr_createtab is procedure which will create a physical table and return the table name in the out variable v_tbl_nm.
I need to query on this dynamic table and return the result as return result. But i am not able to do it.
Here T_web_loylty_report_table is a type.
CREATE OR REPLACE function CDW_DSS.f_ReturnTable(i_mrkt_id in number, i_cmpgn_year in number) return T_web_loylty_report_table is v_tbl_nm varchar2(50); i_cntry_cd varchar2(20); v_sql_str varchar2(32567); [code]......