column of formulas based on a sql statement
Hi all
I have a select statement:
(select sum(t.CR_AMOUNT-t.DR_AMOUNT) from HOSPITAL_TRANSACTIONS_VIEW t where t.TRX_TYPE in ( 'CR','DR') and t.CUSTOMER_NO = :account_no -- where (:account_no) is a char column in a non-database block and t.trx_date between '01-03-2014' and '31-03-2014') ;
and I want to create a column of formulas based on that, but I do not know how?
Thanks in advance
I don't see why you need a column of formulas to do this, as one element of forms is involved. But if you want to use a column formula:
1. create a function local on your form name so maybe FK_FORMULA, col of the: account_no as IN-variable to this function. Inside your sql function and return the result as the result of the function.
2. in the formula field, simply call the function as FK_FORMULA (: account_no)
Tags: Oracle Development
Similar Questions
-
create a dynamic help based on a sql statement
Hello
A few years ago, I asked the same question, but I had no adequate answer to my problem:
I have to build a text of dynamic help for items diaplayed (bubble help or better pop-up window). When I go to a header element there is a? Displays and when I click on the left mouse button it will be a constant display text. Now, I have a table with explanation (build on documentation in the table) for each column on each page. If I want to start an SQL statement when I click the button and the text should be displayed in the pop-up window.
An example everywhere or can someone help me otherways?
Concerning
Siegwin
fixed for you, the changes are:
- added onclick = "getItemHelpText('#CURRENT_ITEM_NAME#'); call to your model of 'Optional with Help' for all items using this model will have the same call in.
- adding the global page, page 0,
- moved JavaScript "getItemHelpText" on page 0 to become a global function, so you can use it anywhere in the application
- added item globle P0_DYNAMIC_HELP_TEXT page 0
- update your application process to set the value of P0_DYNAMIC_HELP_TEXT on the convening of AJAX, you must fix the help text.
- help text changed to P41_ENAME in & P0_DYNAMIC_HELP_TEXT.
That's all I think, tested worked.
good luck with the rest...
-
How can I replace the value of the column with a particular value in SQL
Hi all
Is someone can you please tell me how can I format my output with the replacement of a column value with a specific value that really depends on the current value of the column
I am executing the following SQL statement
Select state, count (id) from < table_name > where composite_dn = < composite_dn_name > Group by State;
My current performance is:
State Instance number
1 3
3 28
I want to replace the value in the State column as follows
No.OfInstances State
3 filled
28 faulted
I want '1' to be reppaced of 'Done' and '3' is replaced by 'Faulted. '
Is is possible with SQL or PL/SQL, if it is then how I can achieve this required. Help, please!
Thanks in advance!
Published by: Roshni Shankar on October 27, 2012 12:38 AMHi Claude,.
I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
See - http://www.techonthenet.com/oracle/functions/decode.phpselect decode(t1.state,t2.state_id,t2.state_name), t1.count_id from
t2, (select state,count(id) count_id from where composite_dn= group by state) t1 where t1.state = t2.state_id; HTH
Vanessa B.Published by: Vanessa B on October 27, 2012 14:02
-link addedPublished by: Vanessa B on October 27, 2012 14:19
-added code sample -
error in pseudo-column "DECODE" can be used within an SQL statement
Hi gurus,
Your help is grealty appreciated. Please help me.
I'm trying to see if I can use the function decode as below and get the error, here below vPlatformfrom value would be QA or MTS
vDataBase1 :='@'|| Decode (vPlatformfrom, 'STD', 'STD', 'QA', 'QA')
Before we check function NVL to a single platform, but now we need the database based on the platform is here.-vDataBase1 :='@'|| NVL (vPlatformto, 'MTS');
Error:
PLS-00204: pseudo-column "DECODE" or function may be used within an SQL statement
> So, here, instead of the decode function, I can use this case as below:
Well... you can, but why? In your CASE, you simply return the same value as the variable.
You might as well use: vDataBase1: = vPlatformfrom; It would reach exactly the same thing.
If vPlatformfrom can be a null value, you will need to decide what database to use or an exception. I think you're original code (NVL) were probably more correct, but I can't decide which.
(and don't bother selecting double, it is an unnecessary sql statement which must be analysed, etc..)
-
Hide results SQL - State of the button, see the
Hello
I use APEX 4.0 with Toad for Oracle 10.5. My problem is that I need to hide the delete button based on the results of the SQL statement. When the point: P43_DEPARTMENT_ID value is entered and there is for any field below, the data will appear along the line.
But when no data appears that there is still a blank line for the fields. That will make the hidden Delete button. I don't know how to remove this row of the grid with my results of the select statement above. The State still thinks there is a line and a value (s) appear statement.SELECT (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (division_id, 0, 5) FROM tbl_division)) AS DIVISION, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5) FROM tbl_grant)) AS GRANTS, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5) FROM tbl_allotment)) AS ALLOTMENT, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT department_id FROM tbl_department_temp)) AS DEPARTMENT_TEMP, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (division_id, 0, 5) FROM tbl_division_temp)) AS DIVISION_TEMP, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5) FROM tbl_grant_temp)) AS GRANT_TEMP, (SELECT distinct department_id FROM tbl_department WHERE department_id = :P43_DEPARTMENT_ID AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5) FROM tbl_allotment_temp)) AS ALLOTMENT_TEMP FROM DUAL
DIVISION OF | GRANTS | ALLOTMENT | DEPARTMENT_TEMP | DIVISION_TEMP | GRANT_TEMP | ALLOTMENT_TEMP
________|_______ |___________|__________________|_____________ |____________|_________________
Can someone help me with my select statement or provide me with advice on how to remove this blank line when there is no data? I can't create a view and then add a WHERE IS NOT NULL clause because of the variable binding: P43_DEPARTMENT_ID.Do not know if I just got it, but what about:
SELECT SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
OF tbl_division))
THE DIVISION,
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
OF tbl_grant))
FORM OF GRANTS,
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
OF tbl_allotment))
AS ASSIGNMENT,.
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT department_id
OF tbl_department_temp))
AS DEPARTMENT_TEMP,
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (division_id, 0, 5)
OF tbl_division_temp))
AS DIVISION_TEMP,
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
OF tbl_grant_temp))
AS GRANT_TEMP,
SELECT (separate department_id
OF tbl_department
WHERE department_id =: P43_DEPARTMENT_ID
AND department_id IN (SELECT SUBSTR (fk_division_id, 0, 5)
OF tbl_allotment_temp))
AS ALLOTMENT_TEMP
OF THE DOUBLE
LESS
SELECT NULL, NULL, NULL, NULL, NULL, NULL, NULL from doubleThis should ensure you don't receive a "no data found" when all the columns return null.
-
Date range of calculation with the SQL statement
I'm sure that there is a way to do this in SQL, but I can't understand it. I can write a PL/SQL script to do it, but prefer to use a SQL statement. My database is the database of Oracle 10.2.0.4.0.
I have a table that contains information such as employee number, service id, and date effective start-up of the person in this Department. There are data in another table I want to update their department number in based on their date of entry in the range. If I could figure out how to correctly select the entry into force, I can do the rest.
I have data such as:
EMP_ID DEPT_NO EFFECTIVE
-------------- ----------------- ---------------------
101 1000 1/15 / 2001
1050 101 5/24 / 2005
101 2010 6/8/2008
101 1000 8/2/2010
I want to write a SELECT statement that returns something like this where the end_date is the eve of the ENTRY into force and the last record didn't an end_date because they are always assigned to this service. In addition, the first record in the column, I won't choose a DEPT_NO because the logic of the entry into force has been added in January 2001, he says if a person started in 1985 they might have zero departments at several times so I won't update all data for this period:
EMP_ID DEPT_NO EFFECTIVE END_DATE
--------------- ---------------- ---------------- ----------------
101 1/14 / 2001
101 1000 1/15 / 2001 5/23/2005
1050 101 5/24 / 2005 6/7/2008
101 2010 6/8/2008-8/1/2010
101 1000 8/2/2010
Here is a script to create the data into a temporary table which can be used to write a SELECT statement. I added two records of employees with different dates.
create the table temp_activity
(emp_id number (12),)
dept_no number (12).
(entry into force);
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(101,1000,to_date('1/15/2001','MM/DD/YYYY'))
/
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(101,1050,to_date('5/24/2005','MM/DD/YYYY'))
/
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(101,2010,to_date('6/8/2008','MM/DD/YYYY'))
/
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(101,1000,to_date('8/2/2010','MM/DD/YYYY'))
/
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(102,1040,to_date('1/15/2001','MM/DD/YYYY'))
/
INSERT INTO temp_activity
(EMP_ID, DEPT_NO, ENTERED INTO FORCE)
VALUES
(102,2000,to_date('6/16/2006','MM/DD/YYYY'))
/
Any help is appreciated. It's probably easy, but I can't get my brain wrapped around it.
Thanks - mikeselect emp_id, dept_no, effective, end_date from ( select emp_id, dept_no, effective, lead(effective) over(partition by emp_id order by effective) - 1 end_date, row_number() over(partition by emp_id order by effective) rn from temp_activity union all select emp_id, null dept_no, null effective, min(effective) - 1 end_date, 0 rn from temp_activity group by emp_id ) order by emp_id, rn / EMP_ID DEPT_NO EFFECTIVE END_DATE ---------- ---------- ---------- ---------- 101 01/14/2001 101 1000 01/15/2001 05/23/2005 101 1050 05/24/2005 06/07/2008 101 2010 06/08/2008 08/01/2010 101 1000 08/02/2010 102 01/14/2001 102 1040 01/15/2001 06/15/2006 102 2000 06/16/2006 8 rows selected. SQL>
SY.
-
Find the name of the view based on a sql query
Can anyone suggest me how to find the name of the view based on a sql query? When I try to the following select statement:
but I get this error:select view_name from user_views where text like '%SELECT * from TABLE%';
But as I notice that the TEXT column is really LONG to type... Are there any other table system that store information about the text using each view?SQL Error: ORA-00932: inconsistent datatypes: expected NUMBER got LONG 00932. 00000 - "inconsistent datatypes: expected %s got %s"
See this example, using DBMS_METADATA. GET_DDL:
-
Why a sql statement has become slow after upgrade to 11g database
Hello
My previous version of the database is 9I and any sql statement are well-developed.
but after upgrading to 11g database, a sql statement become slowly.
My senior dba friend told me there are a few different calculating methods from 9i to 11g.
is any body can explain this different methods from 9i to 11g, and what should be attention to calculate at what level 9i to 11g. I thank.
SeanThe administrator of yours is correct. What he meant, 9i, the works of the optimizer with different formulas and 11 g, there are different formulas. PS this sometimes causes when you upgrade from 9i (or even 10g too), analyze the queries that worked with RBO in 9i perfectly and used indexes, all of a sudden they stop using it because the CBO think not that this is a good choice. It would be too difficult to put formulas here by anyone, but what I can say is that to buy a book.
http://www.Amazon.com/cost-based-Oracle-fundamentals-experts-voice/DP/1590596366And practice on 9i, 10g and 11g. It would say a lot of formulas used by oracle.
HTH
Aman... -
Game of demand does not pick up the good period open to active fixed from the SQL statement
Hello
We have a demand that could kick off the simultaneous application of the value: Ixr: list of asset by period and Ixr: reserve book report.
ON overall demand, we set the parameter: default period based on a SQL = select period_name from FA_DEPRN_PERIODS where book_type_code = 'PER2011' and period_close_date is null
The query runs with the good period, until we open the new period, the game application will still come closed period.
When I run this script on the database, it gives the correct name of the open period.
Why all the demand does not pick up the open period?
Rock
Hello
When planning, the parameter values that you gave when planning will not change.
For the test, for a simultaneous program, I create a parameter and has given the value 100 tank and default type sql statement and the value as below.
Select to_char (sysdate, 'dd-mon-yyyy hh24:mi:ss') of double
If, at the time of the program, it shows a default value such as the date and time with seconds. Then I planned it for every minute.
When you check in for each race it is seen the first time only, it does not.
so in your case, you must plan its new after change of period.
Hope this will help you...
-
How can I pass a condition of the table in the sql statement?
For example, in the table in the COND Varchar2 column (200) there is the value ' VAR > 10'.
| COND |
|' VAR > 10' |
where VAR is the name of the table column. I would like to make statement CASE WHEN VAR > 10 AND 0... I tried with as subquery
WHEN BOX (SELECT COND FROM TABLE WHERE...) THEN 0, but it does not work.
Hello
You can do this by using dynamic SQL.
that is to say:
declare v_stm varchar2(4000); v_cond varchar2(100); v_result integer; begin select cond into v_cond from yourtable where a=1; v_stm := 'select case when '||v_cond||' then 0 ...'; -- dynamic sql execute immediate v_stm into v_result; end; /
Remember that, in general, dynamic SQL has a performance degradation that SQL static and should be avoided when possible.
Storage condition or the SQL statements in the tables is not a good practice.
Kind regards.
Alberto
-
Vo SQL statement will not use aliases
Hello!
When I tried to enter the following code in the SQL statement in my definition of VO, it gave me an error in column ambiguously defined:
SELECT a.PERSON_ID,
a.EFFECTIVE_START_DATE,
a.EFFECTIVE_END_DATE,
a.EFFECTIVE_START_DATE,
a.EFFECTIVE_END_DATE,
a.EMPLOYEE_NUMBER,
a.FULL_NAME
OF PER_ALL_PEOPLE_F one
I need to put an alias because I need to refer to one of its columns inside the place where the condition. What is supposed to be the right way to set it?
Thank you.
whatever the dynamic where clause you add with setwhereclause, it is added on top of the query you mentioned in the original Version, so your alias doesn't work
Now if you look at the care of error fully you can see you are querying VO got closed in support () and another alias has been given by the framework (OAF) so all adding the whereclause by setwherelcause dynamically delete pls the 'a'., of the Sub statement
setWhereClause ("a.employee_number =: 1 and a.effective_end_date = (select max (effective_end_date) in the per_all_people_f where employee_number = a.employee_number) '");
ratther write like
setWhereClause ("employee_number =: 1 and effective_end_date = (select max (effective_end_date) in the per_all_people_f b where b.employee_number =: 2)" ");
setWhereClauseParams (null); Always reset
setWhereClauseParam (0, EmpNumber);
setWhereClauseParam (1, EmpNumber);
I hope that is clear, if not please let me know.
Kind regards
Hemant
-
How to run a SQL statement to use a specific implementation plan
Hi all
I have a SQL that has recently been run badly. I tried the Advisor tuning SQL for the given SQL query and it gives the following information:
GENERAL INFORMATION SECTION
-------------------------------------------------------------------------------
Name of the task of tuning: 2q94zb7djr2xn
The owner task of tuning: LMDBPROD
Type of work: single SQL statement
County of execution: 2
The current run: EXEC_8869
Type of execution: TUNE SQL
Scope: COMPLETE
Time Limit (seconds): 60
Status: COMPLETED
Started on the: 03/02/2014-20:43:39
To the: 03/02/2014 20:44:25
-------------------------------------------------------------------------------
Name of the schema: LMDBPROD
SQL ID: 2q94zb7djr2xn
SQL text: SELECT NPCOMMON. FGET_ACTION_CODE (ORDNUM) ACTIONCODE, STATUS,
SUMA COUNT (*) FROM SORDER, WHERE HEADORDNUM IS NOT NULL AND
NPCOMMON. FGET_PRODUCTOFFER4ORDER (ORDNUM) IN (SELECT ID FROM)
PRODUCTOFFER WHERE PPSPECIFICATION_ID IN (SELECT ID FROM)
PPSPECIFICATION WHERE PCLASS_CODE IN (SELECT PCLASS_CODE FROM)
ARUSERGROUP WHERE CODE IN (SELECT ARUSERGROUP_CODE FROM)
ARUSER_ARUSERGROUP WHERE ARUSER_USERNAME =: B1 AND STATUS = '1')
AND STATUS = '1'))) GROUP BY NPCOMMON. FGET_ACTION_CODE (ORDNUM),
STATUS
-------------------------------------------------------------------------------
RESULTS SECTION (1 result)
-------------------------------------------------------------------------------
1-alternative Plan conclusion
---------------------------
Some implementation plans alternative for this statement was found by searching
performance data in real-time and historical of the system.
The following table lists these plans sorted by their average time.
See "SECTION of ALTERNATIVE PLANS" section for detailed information on each
plan.
plan ID hash last visit elapsed note of origin (s)
-- ---------- -------------------- ------------ --------------- ----------------
1 617797893 2013-07-11/07: 45:20 9.555 no reproducible STS
2 1311086720 2014-01-31/04: 00:44 19.569 AWR
3 1226863820 2014-01-31/18: 00:24 AWR 21.158
4 1359606848 2014-02-03/16: 00:34 21.492 AWR original plan
The plan with hash 617797893 seems the most efficient one and is based on some specific SQL Tuning Set I ran on this time. But the note says that the plan is not reproducible. Is there anyway how can I force the SQL statement to execute the plan? The database version is Standard Edition 11.2.0.1.0
Best regards
Rodriguez
Hello
I think you can use this
before 11 g, we used to create an outline stored for this.
concerning
-
Cannot display the results to the database during "Update": SQL statement
Hello
I get this error trying to update a VO via the UI or BCBrowser.
Cannot display the results to the database during "Update": SQL statement
This is a default single front & right THAT VO creates on the object of the entity (Database Table)
On the same table and with the same credentials of DB, I could update the record.
Any guess on what went wrong?
Thanks in advance for any help.
p.s Jdev 11.1.1.6
Journal:
oracle.jbo.DMLException: Houston-26041: could not publish data from database in "Update": SQL statement "START the CAR UPDATED CarEO SET SEL_ITEM =: 1 WHERE TXN_NO =: 2 AND LOGID =: AND SEQNO = 3: 4 POLL DELIVERY_MODE, CERTIFICATION_REQ, SOFT_COPY_IND, SELITEM IN: 5,: 6,: 7,: 8; END; ».
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:583)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
at oracle.jbo.uicli.controls.JUNavigationBar.doAction(JUNavigationBar.java:412)
at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:111)
to oracle.jbo.uicli.controls.JUNavigationBar$ NavButton.actionPerformed (JUNavigationBar.java:118)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
in javax.swing.AbstractButton$ Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
to java.awt.EventQueue.access$ 000 (EventQueue.java:85)
in java.awt.EventQueue$ 1.run(EventQueue.java:603)
in java.awt.EventQueue$ 1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:98)
in java.awt.EventQueue$ 2.run(EventQueue.java:617)
in java.awt.EventQueue$ 2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged (Native Method)
in java.security.AccessControlContext$ 1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.sql.SQLException: invalid column type
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:150)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:399)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:581)
at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1765)
at oracle.jbo.server.OracleSQLBuilderImpl.bindUpdateStatement(OracleSQLBuilderImpl.java:2243)
at oracle.jbo.server.EntityImpl.bindDMLStatement(EntityImpl.java:10524)
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:412)
... 52 more
The problem is solved now.
new columns added to the database table, after the creation of the entity object. Those changes were not picked up in the entity object.
I found this difference after object entity with the DB Table comparison.
And when I added these new columns to EO & VO, I don't get this error more.
Thanks to all who tried to help
-
How to analysis of the XML in the sql statement?
Hi friends, I have a table that contains a column of type CLOB, stores in xml format. For example, the data are like that
<Employees xmlns="http://TargetNamespace.com/read_emp"> <C1>106</C1> <C2>Harish</C2> <C3>1998-05-12</C3> <C4>HR</C4> <C5>1600</C5> <C6>10</C6> </Employees>
So how can I write the sql statement for the analysis of the data at the top
create or replace procedure parsing_xml
(
clob trans_payload
trans_dir varchar2
)
as
Start
if(trans_dir='inbound/emp')
then
insert into emp_proj
(
employee_id
last_name
hire_date
job_id
salary
department_id
)
Select t1.c1
t1.c2
t1.c3
t1.c4
t1.c5
t1.c6
from xmltable
(
XmlNamespaces ('http://TargetNamespace.com/read_emp' as 'emp').
' / ' emp:Employees by the way of xmltype (trans_payload)
columns
whole path of C1 'emp:C1. "
path of varchar2 (10) C2 'emp:C2. "
C3 varchar2 (10) path "emp:C3."
C4 varchar2 (10) path "emp:C4."
whole path of C5 "emp:C5."
C6 varchar2 (10) path 'emp:C6 '.
) t1;
end if;
commit;
end;
-
Quick question, on the execution of the query of the ff, I do
Select a.column, sum (decode(a.column,'string',1,'etc...')
But when I include a func or procedure, it won't allow me too and that he would give a PL/SQL: SQL statement ignored error and it will compile only if I remove the first a.column as follows
Select sum (decode(a.column,'string',1,'etc...')
Why is it so? And how should it be rewritten to include the select a.column?
Start
Select a.gameid, sum (decode(a.nscores,'Perfect',100,'Excellent',95,'Good',80,'Poor',50) 'scores'
in x,y
Of...
where the...
return x
end myFunc;
Fundamentals of the PL/SQL language
Concerning
Etbin
Maybe you are looking for
-
How the iPhone 6 more lock 9.3.1 app
How iPhone 6 more s 9.3.1 app lock and hiden app thank
-
Where did the option go to folder for downloads! Frustration! : ()
Where do go to download the file from the downloads option! Frustration! : () The new downloads thing sucks! Also how do I downloads to display automatically with the new system during a download? I speak of course of the downloads window that has re
-
I forgot my password of windows on a hp pavilion p66774y with windows 7
I forgot my password of windows on a hp p66774y with windows 7
-
SFC/scannow is a strange and repetitive response.
C:\Windows\System32>sfc/scannow Start scanning system. This process will take time. Start of the phase of verification of the scanning system.Full check of 100%. Windows resource protection found corrupt files and managed to fixthem. Details are pro
-
Incorrect and automatic filepath to another profile of users
For some reason, the profile of my mother (Administrator) automatically seems to store lots of files, such as documents, temporary Internet files, in another profile that is not displayed in the start menu. I followed the path to 'Users' and there ar