Forms :: Executing Query When Display Box Value Changes
Aug 24, 2010
In my form i have 2 datablocks, the first contains only a display item which is populated from a lov when a user presses a button. The second datablock shows a list of items which should be queried dependant on the value of the above LOV. What i thought i could do is on a post-change trigger for the display item is:
go_block('block_name');
do_key('execute_query');
However, i am told i cannot do these in a post-change trigger, how to acheive what I am looking. Would i perhaps have to create my own trigger somehow or is their a simplier way.
I am trying to insert data from 9i to 11g using db link with the below query but while doing so the select statement is going for a full table scan even though rowid is used. But when we execute the same select statement without this insert command it is using proper index. Similar issues I am facing for updates.
Query:
INSERT INTO /*+ APPEND */ emp@db_link select * from emp where rowid ='AAC2SmAIIAAAHQgAAZ'
I am trying to execute an inline spatial query from c# using ODP.NET. This is a select query and I am passing 2 parameters to this query, one is string and other one is SDO_GEOMETRY. I am able to send SDO_Geometry parameter from c# using Oracle UDT custom designed classes.
Query is working as intended but occasionally giving the following errors:
ORA-29902: error in executing ODCIIndexStart() routine ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333 ORA-29902: error in executing ODCIIndexStart() routine ORA-13031: Invalid Gtype in the SDO_GEOMETRY object for point object ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
I could not figure out the cause of this issue (as it is not failing frequently). Am i getting this issue with the actual query or with Oracle UDT conversion.
when am trying to use nvl for one condition it is taking lot of time to execute but when am removing nvl function then the query executing in 2 min. condition is given below
I need to execute a procedure based on a value in a form. So the procedure name will be changing for value selected in a list.
I need to know a method where i could store the procedure name in a table and when ever i select a value from the list, the respective procedure needs to be executed.
I'm facing a really strange problem in Forms with an FMB that has a couple of canvas, but the main one canvas is showing a JPG (like a Wall Paper for the application, in fact this FMB would be the main FMB and it will call the main menu also). The problem is on run-time (locally, running on windows, just in some Laptops). At execution time, there's a FRM-92102 error, but only deleting the image, and trying again, the Screen run perfect!
The worst part is that same FMB run perfect on other laptops. I've tried almost everything : Creating again, just the form with one canvas and importing the image, and Run, but same error appears again. Trying with another image, same results.
I have a requirement where I want to display amount what I have billed to my client and then how I received my amounts from that Bill. For eg.lets say there is bill no 001 amounting 10000 and after some days I received a part payment cheque/cash from client worth 2000 then he gave second part 2000 and then finally I received 2000. Still 4000 is remaining to be received.So in tabular format I want to display data which will have 3 records of 2000 and one record of balance 4000.
In attached file i have given few examples, where highlighted area is what i want to derive. There are formula's in Collection date, delay by and Int calc. Basically highlighted lines are the ones which should be shown in query result. And data shown above that is what i have right now.
Is there a way to find customers purchased only single product from the following table?
cusno Product Date ----- ------ ---- 121 ES 03/12 121 NT 30/12 131 ST 03/12 13 WT 04/12 150 ES 05/12 150 ES 06/12 150 ES 07/12 160 MN 05/12 160 ES 06/12 160 ES 07/12 162 NT 08/12
I need a query to display only 150 and 162 as they have purchased only one product.
The table has single column & the values may differ,that is, they may have 1-2-3-...-n in a single row, but the desired output is to be in the rows as shown above.
I tried concepts of SQL up to my knowledge, but I failed. The query to be done only in SQL.complete this query.
I want Hierarical query to display my Chart_Of_Account. I want to make a tree Form in 6i error i am getting is connect by nocycle prior account_code=parent_code * ERROR at line 4: ORA-00920: invalid relational operator
Table
Create Table Chart_Of_Account (Account_Code Char(19), Account_Title varchar2(70), Parent_Code Char(19)) insert into Chart_Of_Account ('DGHOA01010101000001','TEST','DGHOA01010100000000') insert into Chart_Of_Account ('DGHOA01010101000002','TEST1','DGHOA01010100000000') insert into Chart_Of_Account ('DGHOA01010101000003','TEST2','DGHOA01010100000000')
select -1,level,account_code||' - '||ACCOUNT_Title,'NULL',to_char(ACCOUNT_CODE) connect_by_iscycle from chart_of_account start with Substr(account_code,13,7)='0000000' connect by nocycle prior account_code=parent_code
I have 3 tables, Emp(Emp_id,emp_name),dept(dept_no,dept_name),emp_dept(emp_id,dept_no). Emp tabl ehas some 20 employes id who belongs to different departments.There are few employee who belongs to multiple departments as well. I want to fetch records of emp_id, emp_name, dept_no in the following format.
i like to display a Table data like the below format,
Output:
EMPNO JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC 00094 122 153 145 224 245 545 114 544 444 111 555 222 00095 233 123 145 224 205 545 114 444 444 111 555 222 00096 163 123 145 224 215 545 114 551 444 111 555 222 00097 163 0 145 224 215 545 114 551 444 111 555 222 conditions:
where condition: where year = 2007
Table Structure:
create table HR_PAYSLIP ( EMP_NO VARCHAR2(6) not null, YEAR NUMBER(4) not null, MONTH NUMBER(2) not null, BASIC_PAY NUMBER(9,2), )
Insert Command;
INSERT INTO PAYSLIP (EMP_NO, YEAR,MONTH,BASIC_PAY) VALUES(00046, 2007, 1, 2314);
Pls Note: The above table data i have mentioned is an example with employee numbers and the basic_pay for all months in the particular year 2007, the employee no may be more and that must be displayed only one time like above for year 2007, and if the basic salary is zero for a month then it should be displayed as zero for a particular month
I dont want to print the repeated value(NAME) of C1 multiple times as below.
C1C2C3C4 NAMEJOHN10ABC SMITH30DEF ROBERT60XYZ
I could do it using the below query using union with the rownum.
select * from ( select rownum rn, c1,c2,c3,c4 from table_new ) where rn =1 union select * from ( select rownum rn, decode(c1,null,null),c2,c3,c4 from table_new ) where rn between 2 and 3
Is there any other way of displaying using a single sql query.
is there a way to keep the display of the form when we call another new form. my scenario will be as following:
am in form1 , i call form 2 from a menu, after this call form2 is open in place of form1.
i have no control in form1 and i can't change anything on it, i don't know hw the menu option is calling form2.the only control i have will be within form2 if there is any change i can make it.i read something about MDI, and OPEN_FORM() procedure, but i think this will required a change in form1 which i can't do.
is there any change i can make in form2 to display it and keep the display of form1 at the same time behind it ?
My form failed to display photo (data type long row).
scenario a) If photo in black and white with width : 472 pixels height: 590 pixels horizontal resolution : 300dpi vertical resolution : 300dpi bit depth : 8 size file : 28KB
scenario b) If photo in color with width : 124 pixels height: 155 pixels horizontal resolution : 75dpi vertical resolution : 75dpi bit depth : 24 size file : 14KB
Above 2 scenario:
My form 6 program can successful display the photo for scenario a , while for scenario b, my form 6 program failed to display the photo.
I have a form in which the fields are not database items i want to display the next record, i know i can use the next_record for the same but it does not work since it is not the database item, is there any way when the item is not the database item and i can see the next record. I use the cursor for loop but since it fecthes all the records in one go it cannot display one record at the time in the form..