How to call a PL/SQL for a hyperlink column report procedure
Hallo!Normally, a value of column in a report, a link takes you to a page in your application or to another URL.
And you can send the value of this cell to the calling page.
I want that oracle runs a procedure with the values as in parameters, if I click on this hyperlink.
Should I call a dummy page and define this procedure in the header of this page, or leave it otherwise?
Can give you an example to my?
Thank you very much!
Gerhard
It is a case of use of an application process.
Tags: Database
Similar Questions
-
How to call the PL/SQL of EntityImpl procedure
Hello
I have a page that can create/update visitors. When a new customer is created themselves, a line gets inserted into the database table. I use EO for this feature.
I need to create lines to two or three other table also when a new line is created in the main table. What is the best practice for this feature?
The 2 options that I know:
1 create a trigger on the main table and the appeal of trigger for inserting rows in other tables.
2. call a PL/SQL of EntityImpl procedure after the permanent data is committed to the table. (If this is the best approach, could you please let me know how to get there)
See you soon
AJ
In fact, Java Mail API is included in WLS and JDev, then you can simply add %MIDDLEWARE_HOME%\Oracle_Home\oracle_common\modules\javax.mail_2.0.0.0_1-4-4.jar to your project.
Dario
-
I have a pl/sql procedure that may attend the 2-20 mins depanding on the data.
How to call this the BPEL?
Prasanna-One way to do this would be:
1. define a DBMS_SCHEDULER job for your pl/sql procedure.
2. use BPEL to submit the work.
3. query the table on user_scheduler_jobs or any other table that you can use to find out when the work.Another way would be to use (if you also have ODI):
1 use ODI to call the plsql in a package
2 expose the workflow as a Web Service for BPEL
3 package ODI BPEL recall once the work is completed and a correlation between the response to the request.Thank you
Neil. -
How to call the pl/sql function in application of the ADF
Hi Experts,
I need to call the pl/sql function in application of ADF, I have logic written in my AM
Method:
public String reportStoredProcedure (locationID customerID, number,
String tailNum) {}
CallableStatement st = null;
String v_sanctioned = null;
If (locationID! = null & & customerID! = null & & tailNum! = null) {}
System.out.println (locationID + "" + customerID + "" + tailNum);
Tail string = "TAIL";
String result = "N";
try {}
String stmt =
"start XXWFS_SANCTIONS_PKG. CHECK_SANCTION(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11); end; « ;
St = getDBTransaction () .createCallableStatement (stmt, 0);
st.setNull (1, Types.VARCHAR);
st.setNull (2, Types.NUMERIC);
st.setObject (3, customerID);
st.setNull (4, Types.NUMERIC);
st.setNull (5, Types.NUMERIC);
st.setObject (6, locationID);
st.setNull (7, Types.NUMERIC);
st.setNull (8, Types.NUMERIC);
st.setObject (9, tail);
st.setObject (10, tailNum);
st.setObject (11, result);
St.Execute ();
System.out.println ("v_sanctioned in AM:" + v_sanctioned);
} catch (Exception e) {}
e.printStackTrace ();
return "N";
} {Finally
If (st! = null)
try {}
St.Close ();
} catch (Exception e1) {}
E1. PrintStackTrace();
return "N";
}
}
} else {}
System.out.println ("v_sanctioned is null");
v_sanctioned = "N";
}
Return v_sanctioned;
}
Error:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'CHECK_SANCTION '.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3858)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at model.view.CardAMImpl.reportStoredProcedure(CardAMImpl.java:182)
at com.emboss.bean.ReadyToPrint.invokeVSanctioned(ReadyToPrint.java:485)
at com.emboss.bean.ReadyToPrint.PrintingCards(ReadyToPrint.java:434)
at com.emboss.bean.ReadyToPrint.printCards(ReadyToPrint.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Can someone help me how to call...Call it in function, not as a procedure you do
try { String stmt = "begin :1 := XXWFS_SANCTIONS_PKG.CHECK_SANCTION(:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12); end;"; st = getDBTransaction().createCallableStatement(stmt, 0); st.registerOutParameter(1, Types.VARCHAR); st.setNull(2, Types.VARCHAR); st.setNull(3, Types.NUMERIC); st.setObject(4, customerID); st.setNull(5, Types.NUMERIC); st.setNull(6, Types.NUMERIC); st.setObject(7, locationID); st.setNull(8, Types.NUMERIC); st.setNull(9, Types.NUMERIC); st.setObject(10, tail); st.setObject(11, tailNum); st.setObject(12, result); st.execute();
= st.getString(1); -
How to call the output parameter during the execution of a procedure
Hello
I wrote a small procedure using parameter, how can I call this procedure?
exec prc_TABLE('emp',1)
I tried prc_TABLE ('emp') that the two do not work?
Any help would be appretiated.
Zaidcreate or replace procedure prc_TABLE (str in varchar2, CODE OUT number ) Begin CODE := 1; DBMS_OUTPUT.PUT_LINE(code); end; /
>
I wrote a small procedure using parameter, how can I call this procedure?
>
You can not call SQL - if that's what you are wanting to do. You can only call functions of SQL, and these functions cannot have OUT parameters. -
Flash AS3 Pro: How can I change a font for a specific column?
I would like to use a font for a specific column in a DataGrid.
Thank you
Yes, you can set individual policies for cells in a datagrid control. Look at this tutorial: text formatting changes to cells in the DataGrid control. This will give you the basic idea for the outer class, you need to write. In the example, you will see that there are three cells that have changed their color of the text. To change the font, you must first import the new font in your file library and set a name for Actionscript police liaison. Then, you add just a line to set the font for a single cell:
case "pending":
TF. Color = 0xFF0000;
TF.font = 'Times '.
for example.
-
How to call a pl/sql procedure to an event handler in NetBeans IDE
I want to call a procedure from a button click event handler in NetBeans and also pass a parameter to the procedure. How I have here a this?
Wrong forum!
This question belonged to a NetBeans forum.
Please mark the thread ANSWERED and repost in a forum for details.
-
How to call the pl/sql function of the ofa
Dear friends,
I am trying to call a function of OPS page .but iam getting error as
java.sql.SQLException: ORA-01861: literal does not match the format string
ORA-06512: at line 1
It is my function, callable statement
FUNCTION CAR_LOAN_VALIDATION (P_PERSON_ID IN NUMBER
P_DEDUCTION_START_DATE AS
P_DEDUCTION_END_DATE AS
P_LOAN_VALUE NUMBER
)
RETURN VARCHAR2
IS
l_message VARCHAR2 (100);
l_contract_type VARCHAR2 (50);
l_loan_eligible_date DATE;
l_grade VARCHAR2 (15);
l_old_loan_end_date DATE;
l_max_loan_end_date DATE;
l_remaining_amount NUMBER;
l_eligible_amt NUMBER;
BEGIN
BEGIN
SELECT - papf.person_id,.
(SELECT the sense
OF hr_lookups
WHERE lookup_type = 'ADTC_CONTRACT_TYPE. '
AND lookup_code = attribut3) contract_type;
ADD_MONTHS (papf.original_date_of_hire, 11) loan_eligible_date,.
DECODE (paaf.ass_attribute2,
'President', '' President. ''
SUBSTR (ass_attribute2, INSTR (ass_attribute2, '.', 1, 1) + 1,)
3)
) grade.
(SELECT nvl (MAX (deduction_end_date), null)
OF xxadtc_car_loan_request
WHERE person_id = p_person_id) old_loan_end_date;
TO_DATE (ADD_MONTHS (p_deduction_start_date, 47)) max_loan_end_date
-to_date (ADD_MONTHS (sysdate, 47)) max_loan_end_date
IN l_contract_type
l_loan_eligible_date
l_grade
l_old_loan_end_date
l_max_loan_end_date
OF per_all_people_f women's wear, per_all_assignments_f ADP
WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.business_group_id = 81
AND papf.person_id = paaf.person_id
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND papf.person_id = P_PERSON_ID;
EXCEPTION
WHILE others THEN
DBMS_OUTPUT. Put_line ('error');
END;
-to obtain the amount of the previous car loan-
BEGIN
SELECT to_number (prrv.result_value)
IN l_remaining_amount
OF per_all_people_f women's wear.
per_all_assignments_f ADP,
pay_assignment_actions CIP,
pay_run_results prr,
prrv pay_run_result_values,
petf pay_element_types_f,
pay_input_values_f pivf,
pay_element_classifications pec,
pay_payroll_actions App,
TPP per_time_periods
WHERE SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
AND papf.person_id = paaf.person_id
AND papf.business_group_id = 81
AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND paaf.assignment_id = pac.assignment_id
AND pac.assignment_action_id = prr.assignment_action_id
AND prr.run_result_id = prrv.run_result_id
AND prr.element_type_id = petf.element_type_id
AND SYSDATE BETWEEN petf.effective_start_date AND petf.effective_end_date
AND prrv.input_value_id = pivf.input_value_id
AND SYSDATE BETWEEN pivf.effective_start_date AND pivf.effective_end_date
AND pivf.NAME = 'balance '.
AND petf.classification_id = pec.classification_id
AND pac.payroll_action_id = ppa.payroll_action_id
AND ppa.time_period_id = ptp.time_period_id
AND TO_CHAR (ptp.pay_advice_date, 'Mon-YYYY') =
To_char (SYSDATE, "Mon-YYYY")
AND petf.element_name = "Fashions ready Ahlami"
- and employee_number = '10185'
AND papf.person_id = p_person_id;
EXCEPTION
WHEN no_data_found THEN
-DBMS_OUTPUT. Put_line (' ERROR: no data!');
l_remaining_amount: = 0;
WHILE others THEN
DBMS_OUTPUT. Put_line ('error');
END;
Select GET_CAR_LOAN_ELIGI_AMT (P_PERSON_ID)
in l_eligible_amt
Double;
IF L_contract_type NOT IN ("Permanent") THEN
l_message: = 'contract Type is invalid. "
END IF;
IF l_loan_eligible_date < SYSDATE THEN
l_message: = 'Date to join is less then a year. "
END IF;
IF l_grade IN ('US', '00', 'AUS', ') THEN
"l_message: = ' your are not eligible Grade."
END IF;
IF l_old_loan_end_date < SYSDATE THEN
l_message: = 'previous loan period is not completed. "
END IF;
IF l_max_loan_end_date > P_DEDUCTION_END_DATE THEN
l_message: = 'Maxinum number of monthly payment for 48 months;
END IF;
IF l_remaining_amount > 0 THEN
l_message: = "amount of the previous car loan is waiting until";
END IF;
IF l_eligible_amt < p_loan_value THEN
l_message: = 'Please check eligible amount ";
END IF;
RETURN nvl(l_message,'S');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
RETURN "error";
END CAR_LOAN_VALIDATION;
END XX_CAR_LOAN_REQUEST_PKG;
CODE THAT CAN BE CALLED BY CODE - CO STATEMENT
{if (PageContext.GetParameter ("Submit")! = null)}
OAViewObject vo2 = (OAViewObject) am.findViewObject ("XxadtcCarLoanRequestEOVO1");
{if(VO1!=null)}
VO1. GetCurrentRow () .setAttribute ("LoanStatus", "pending approval");
int xxpersonId = pageContext.getEmployeeId ();
String xxDeductionStartDate = vo2.getCurrentRow ().getAttribute("DeductionStartDate").toString ();//pageContext.getParameter("DeductionStartDate").toString();
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyy/mm/dd");
ConvertedDate1 date = dateFormat1.parse ("xxDeductionStartDate");
String xxDeductionEndDate = vo2.getCurrentRow ().getAttribute("DeductionEndDate").toString ();//pageContext.getParameter("DeductionEndDate").toString();
SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyy/mm/dd");
ConvertedDate2 date = dateFormat2.parse ("xxDeductionEndDate");
String xxLoanValue = vo2.getCurrentRow ().getAttribute("LoanValue").toString ();//pageContext.getParameter("LoanValue").toString();
int iLoanValue = Integer.parseInt (xxLoanValue);
System.out.println ("loop submit input");
System.out.println ("xxpersonId id is:" + xxpersonId);
System.out.println ("xxDeductionStartDate id is:" + xxDeductionStartDate);
System.out.println ("xxDeductionEndDate id is:" + xxDeductionEndDate);
System.out.println ("xxLoanValue id is:" + xxLoanValue);
TXN OADBTransaction = am.getOADBTransaction ();
String sql = "START: 1: = XXADTC_CAR_LOAN_REQUEST_PKG." CAR_LOAN_VALIDATION(:2,:3,:4,:5); END; « ;
CallableStatement cs = txn.createCallableStatement(sql,1);
String outputval = null; / / int outputval = 0;
try {}
System.out.println ("entry into loop try funtion callable validation");
cs.setInt(2,xxpersonId);
System.out.println ("cs setInt (2, xxpersonId);") is executed");
cs.setString(3,xxDeductionStartDate);
System.out.println ("cs.setString (3, xxDeductionStartDate is executed);'");
cs.setString(4,xxDeductionEndDate);
System.out.println ("cs.setString (4, xxDeductionEndDate is executed);'");
cs.setDate(3,xxDeductionStartDate);
cs.setDate(4,xxDeductionEndDate);
cs.setInt(5,iLoanValue);
cs.registerOutParameter(1,Types.VARCHAR); / / cs.registerOutParameter(1,Types.NUMERIC);
DSI Execute();
outputval = cs.getString (1); / / txn.commit ();
System.out.println (outputval);
TXN.Commit ();
If (outputval. Equals ("S"))
{
am.invokeMethod ("apply");
}
on the other
{
throw new OAException ("is:" + outputval, OAException.INFORMATION name of the Organization);
}
TXN.Commit ();
}
{} catch (Exception sqle)
try {}
DSI Close();
}
catch (System.Exception e)
{
throw OAException.wrapperException (e);
}
throw OAException.wrapperException (sqle);
}
}
Please help where is the error.
Help, please
Let me know for any clarification.
Thank you
Aravinda.
Ford Hi,
See below the code.
In the controller
java.sql.Date DeductionSDate; declare the variable
In LICS
String xxDeductionStartDate = vo2.getCurrentRow () .getAttribute ("DeductionStartDate");
TXN OADBTransaction = am.getOADBTransaction ();
if(xxDeductionStartDate!=null)
{
java.sql.Date startDate = txn.getOANLSServices () .stringToDate (xxDeductionStartDate);
DeductionSDate = startDate;
}
Assign to this cs.setDate(3,DeductionSDate);
Thank you
Dilip
-
How to call a pl/sql UNIX program
Hello
Can someone tell me please for example to call a script shell unix from a PL/SQL program.
dbms_scheduler is an option.
-
How to call a pl/sql function ofa
Hello
When I train call Comptrollership, the error as "bind variable does not exist. Function has 2 input parameters, and it returns a Boolean value. How to solve this error? Can someone help me please... I'm new to OFA.
TXN OADBTransaction = am.getOADBTransaction ();
CallableStatement cs = CreateCallableStatement ("Begin: 1: = resp_license_func (?)") End; ", 2) ;
String outputval = null;
try {}
cs.setString(1,appl_name);
cs.setString(2,user_name);
cs.registerOutParameter(1,Types.VARCHAR);
CS. Execute();
outputval = cs.getString (1);
TXN.Commit ();
}
catch (Exception e) {}
throw new OAException (e.getMessage ());
}
Thank you
NGOHello
You need to change the lines below:
String outputval = null; for int outputval = 0;
cs.registerOutParameter(1,Types.VARCHAR); to cs.registerOutParameter(1,Types.NUMERIC);
outputval = cs.getString (1); to outputval = cs.getInt (1);
Kind regards.
-
How can I write the SQL for this result?
Hello my dear,
Here first of all the script.
the data areCREATE TABLE ACC_TEST( AD_ID NUMBER, AD_NAME VARCHAR2(50), AD_SPM_ID NUMBER); /
I need the following result, when passing a value of Ad_Id. For example I go to 142 then result must beInsert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129); Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136); Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null); INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);
Database 10 G XESelect Ad_Id,Ad_Name From.. ... where ad_id=142 Ad_Id Ad_Name 136 Saleh Ahmed 129 Sazib 124 Jasim Uddin If I Pass Ad_Id=136 Then Result Should Be Ad_Id Ad_Name 129 Sazib 124 Jasim Uddin If I Pass Ad_Id=129 Then Result Should Be Ad_Id Ad_Name 124 Jasim Uddin
Any help will be usefulHello
HamidHelal wrote:
WoW! You are totally my point. How do you understand that? lGuess luck. Guessing is generally not the best way to solve problems. It is generally faster and more reliable to say exactly what you want, as well as give an example.
fallen little more that I want to know, if I want to restrict the output not more then 2, which would be sql?
Now, you're not even giving for example!
Maybe you want something like this:SELECT ad_id , ad_name FROM acc_test WHERE LEVEL BETWEEN 2 AND 3 -- Changed START WITH ad_id = :target_ad_id CONNECT BY ad_id = PRIOR ad_spm_id ;
which will show just the mother and grandmother of the given line.
I work with the developer of forms a lot. Knowledge of SQL is like sql oracle (9i cerfitication) book. But this type of sql is not available here.
where can I learn this type of sql? SQL different then regular?Certification is another matter entirely.
There are books and web sites dealing with more advanced techniques. Sorry, I don't know any good enough to recommend. Some authors (such as Tom Kyte) are always good.Here are a few sites that explain CONNECT BY queries:
http://www.adp-GmbH.ch/ora/SQL/connect_by.html
http://www.oradev.com/connect_by.jsp -
How to build the query SQL for indexes work based on data - dict.?
Hello
I want to build the index 'create' - statement to all indexes have worked-based on the data dictionary.
For example:
create indexes tab1.ind1
on tab1 (lower (col3), lower (col1), col2, col4)
Tablespace "index."
I know I'll find all needed information views all_indexes, all_ind_columns and all_ind_expressions. During the generation of the create statement for the index of the order of the indexed columns must be correct (the order of the indexed column can be achieved using the "position_colonne" column of seen all_ind_columns and all_ind_expressions). But what would be the best way to provide all the necessary information in the right order?
One way would be a PLSQL procedure that puts it all together - but is it possible to use a single SQL statement?
Any help will be appreciated.
Rgds
JHYou can try using DBMS_METADATA. GET_DDL:
SQL> show user; USER is "TEST" SQL> drop table t; Table dropped. SQL> create table t(x varchar2(10)); Table created. SQL> create index i on t(upper(x)); Index created. SQL> select dbms_metadata.get_ddl('INDEX','I','TEST') from dual; DBMS_METADATA.GET_DDL('INDEX','I','TEST') -------------------------------------------------------------------------------- CREATE INDEX "TEST"."I" ON "TEST"."T" (UPPER("X")) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS"
-
How to limit the special characters for a specific column
Dear gurus,
I have a table with a field Champ_1 emp
in this particular Champ_1 is an address column where the data can be as ' 12 st first floor"but suppose by mistake the user has entered data as 12 st first floor & ' must be restricted (not using relaxation but can this be possible using constraints) so for this we can how to restrict the special characters only not to get entered in the column.
Kind regards
friendYes you can do it like this
SQL> create table t (field_1 varchar2(4000)); Table created. SQL> alter table t add constraint t_chk check(length(regexp_replace(field_1, '[[:alnum:]|[:space:]]'))=0); Table altered. SQL> insert into t (field_1) values ('12 st first floor'); 1 row created. SQL> insert into t (field_1) values ('12 st first floor & '); insert into t (field_1) values ('12 st first floor & ') * ERROR at line 1: ORA-02290: check constraint (ARBORU.T_CHK) violated SQL>
-
How do I see the search for the other column table in a report
Hello
I created a 'form on the report' to get entry to reception. Reception table has the column account_code. How add place holder account_name column whose value can be fetch from table account_master.
It is an interactive report on the form region. I've learned there are two ways, one is to alert the request in the "source" of the report and include account_name column by joining the table account_master. Another way is to create a calculation field? (not sure).
I need to know what is the best way to achieve this. I use APEX 4.2.6. EPG.
Thank you
-Anand
Hi Anad,
To configure a new column, you must run the page
In the interactive report drop-> select the columns-> relating to the structure and then save it as the primary default report
Thank you
Sunil bhatia
-
How to upgrade all the record for a particular column in a table based on search criteria.
Hi all
I'm new to ADF. I have a requirement where I have to perform the update of mass on a table.
Scenario:
Ex: I have a search region manual dept. where I search with deptId: 20. I get 20 records in my table. now I have another area where I have an inputchoice list that contains all the column names that exist in the dept table. Beside that, I have a text box and a button update
The user now, first research with dept id: 20 and click on the button Search, where it shows 20 record in the table. He then select an input choicelist(ex: ManagerId) column, then enter the new value in the decision-making box(ex: abc) then click on the button update.
Now, I want to, all the records in the ManagerId column with dept id: 20 update with the new value 'abc '.
Can someone help me with the code.
Thanks in advance...
Hello
If you go to your VO and generate the ViewObjectImpl, here you can create a method that contains two parameters, 1 the name attribute and 2 the value.
Then you can follow something as explained in this post:
ADF tutorial: how to apply actions in bulk to a view object lines
The only difference is that you must create a method like this:
' Public Sub updateAttribute (attribute String, Integer value) {}
RowSetIterator iter = createRowSetIterator (null);
While (iter.hasNext ()) {}
Line = iter.next ();
row.setAttribute (attribute, value);
}
}
Then execute you who expose a customer interface and then after you filter your table according to your criteria just this method passing the correct parameters.
Concerning
Maybe you are looking for
-
Can I put a key ID on my iPad Mini?
Is it possible to get the ID of the contact on my iPad mini? I have the latest version of IOS responsible. Do I need anything else?
-
How can I make several outputs scanned in a single folder? DeskJet 2050 J510
DeskJet 2050 - J510 Windows 7 At present, each image that I scan appears in a separate folder. It's a nuisance for the mutiple image scans. How can I make all the images in one session are displayed in the same fiolde, preferably on my desk?
-
Hello! I had my old HP Laserjet 1010 installed on my HP ProBook 650 G1 sucessfully. Yesterday interrupted with an error message like "personality unsupported PCL" Can help you... Concerning Raimo
-
Default display folder set to 'list' in the download window
Whenever I need to download an attachment of e-mail or other Internet sites (which I often do for my work), the default view for 'desktop' in the download window is on display large icons. No matter how many times I've changed manually this view 'lis
-
I have a 501 to a branch that I need port before www, ftp, and rdp to 3 different hosts. The external interface is dhcp and the Interior is 10.50.1.3 the network is 10.50.1.0/24 Here is what I thought would work, but it's not portforwarding. Can some