Unix+Oracle (How to pass the value back & forth betwwn shell & oracle )

Hi All,
I have one shell script in this shell script i am calling the Oracle procedure and performing some deletion. After execution of this procedure i am sending a mail from shell script always.
Now i want to include a condition for the mail sending , i want to send a mail only if some data is detected for the deletion inside my DB procedure.
My Scenario is:
1. From shell script i am calling one .SQL file there
i have call of my DB procedure.
2. <After this here i want to check either data is
detected or not>
3. Sending the mail as per above condition.
Can you Please help me out regarding this.
Thanks in advances.
Regards
Krishna Shrivas

you have many ways.
example
MINEMP=30
sqlplus /nolog <<EOF
connect scott/tiger
whenever sqlerror exit failure
declare
    countemp number;
begin
    select count(*) into countemp from emp;
    if (countemp < $MINEMP) then
        raise_application_error(-20101, 'Not enough employees');
    end if;
end;
EOF
if [ $? -gt 0 ]
then
    echo not succeeded
fior
DEPT=$(echo "select '@',count(*) from dept;"|sqlplus "scott/tiger"|awk '/^@/{print $2}')etc..

Similar Messages

  • In BADi , How to pass the values between two Method

    Hi Experts,
    We have two methods in BADis. How to pass the value  between two Methods. Can you guys explain me out with one example...
    Thanks & Regards,
    Sivakumar S

    Hi Sivakumar!
    Create a function group.
    Define global data (there is a similiar menu point to jump to the top include).
    Create one or two function modules, with which you can read and write the global data.
    In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
    Regards,
    Christian

  • How to pass the value to "Assignment" when submit the program RFITEMGL?

    Hello friends,
    I want to submit program RFITEMGL  (t-code FBL3N) with some screen fields, some fields are OK to fill such as u201COpen at key dateu201D, u201CG/L accountu201D and u201CCompany codeu201D。 But for the field "Assignment" (It will appear after cilck Dynamic Selection), I don't know how to pass value to it.
    Could you help me about how to pass the value to "Assignment" when submit the program RFITEMGL  (t-code FBL3N) ?
    Thanks a lot!

    Hi,
    Well you can create a small BDC.
    Regards,
    Harsh Bansal

  • How to pass the value from Sub report to main report

    I have un report(mainreport) within a subreport(subreport).
    With reporting services, how to pass the value from Sub report to main report?
    thanks

    Hi Alebet,
    With reporting services to pass values from sub report in to main report is not supported directly.
    But there are some workarounds through which you can get this .
    There are two ways to get this.
    1- Put your sub report query into some table. i mean to say through the subreport query get some temporary table.
    2- Using this temporary tables data write some Scala function in the data base.
    3- Now in your main report query return this scala function as a column.
    4- Extract the column value where ever you want in your main report which is getting calculated from the subreport query. so you will be getting the values returned from the subreport in the main report.
    This will definitely work fine as i have done some report in this way.
    Another way of doing is that
    1- prepare another data set with the same query as in sub report in the data tab.
    2- then refer this 2nd dataset in your main report .
    But better way will be the top one.
    Anyway please let me know if you get the solution.
    Thanks
    Mahasweta

  • How to pass the value dynamically in exp/imp utilities of oracle

    I want to pass the value of org_grp_i dynamically,instead of passing the value
    19.Can you please tell how to write the script to this
    exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=19 \"
    where xxxxxx is the password
    Thanks

    You need to make use of command line arguments. You can go through this link for example.
    http://www.freeos.com/guides/lsst/ch02sec14.html
    In your shell script(say test.sh) you can have
    exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=$1 \"$1 indicates it accepts the first argument from command line. if you want to pass 19, add that next to the script you're executing.
    From command line you can call this shell script say test.sh 19

  • How to pass the values from the Wb Dynpro Application to the SAP Backend ?

    Hi All,
    Good morning..,
    I have scenario like:
    I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
    Upto know I imported the corresponding RFC and maaped to the View.
    How to proceed with the coding to save the data...
    PLease suggest...
    Regards and Thanks in Advance,
    CSP

    Hi  Pradeep
    Steps:
    1. First create an instance for bapi and bind the instance to the bapi node.
      Z<bapi name> zb=new Z<bapi name>();
      wdContext.nodeZ<bapi name>. bind(zb);
    2. Then if u have the import parameter u have to set them by using
        The instance of the above bapi.
        Zb.set<import parameters>;
    3. If the bapi has a table parameters then the structure for the table parameters will also be imported
       In the model class.
    4. Set the table parameters by creating the instance for that structure and using this instance set it.
       Z<Struct>itm tab=new Z<Struct>();
       Tab.set<table parameters>
    5. Then add the structure instance to the bapi instance.
        Zb.add(Tab);
    6. Then Execute the bapi after setting the import parameters.
    7.  If there is any export parameters, then get the values after execution.
    Look at this thread for codes
    Re: RFC call on click of button
    Regards,
    Arun

  • How To pass the value within the page using jsp?

    How to passing the textbox value within the jsp page without using javascript or reload the page.
    I have a scenario like this:
    I have a textbox named as "accno" which allow user to key in the accno. After key in the accno, this accno value will used to do a query from database using jstl.
    here is part of my code
    <input name="accno" type="text" onChange="checkLC()"/>
    <sql:query var="results" dataSource="${db}">
    select accno,name from account where accno = '<%=value get from accno textbox%>'          
    </sql:query>
    <c:out value="${result.rows[0].name}"/>
    note that onChange() is the javascript when user key in accno then automatically go to check database then only show out the name. So how can i get the '<%=value get from accno textbox%>' from accno textbox.

    How to passing the textbox value within the jsp page
    without using javascript or reload the page.No, jsp executes on the remoter server, the text box is on a client machine, you need to send information to the server over the network, http does this with a request, which will reload the page.....................

  • How to pass the value of the return type parameters in teststand sequence file programatically through c#

    I have used the method LoadProtoTypeFromMeteDataToken(tokenvalue,options).with this i cant set the value in the return parameters. How can I pass the value.with the above method it displays parameter Name,Type,In/Out. how can i set the value in the return parameters.

    Or here
    http://forums.ni.com/ni/board/message?board.id=330&thread.id=26979
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • How to pass the value from JSP or HTML  to Applet

    Plz reply ....How can we pass the value from the JSP Page or from HTML page to Applet embedded in same page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • How To Pass the value from JSP to Applet

    plz reply how can we pass the value from the JSP to Applet ...the applet is embedded in JSP page....

    Hi,
    <applet codebase = "."
    archive = foo.jar"
    code = "com.bar"
    name = "bar"
    id = "bar"
    width = "<%=Request["width"] %>"
    HEIGHT = "<%=Request["appHeight"] %>"
    hspace = "0"
    vspace = "0"
    align = "middle"
    alt     = "Applet is Loading..."
    >
         <param name="LANGUAGE"                value="<%=Request["lan"] %>">          
         <param name="LOGOUT_USER_URL"           value="EndSession.asp">
         <param name="DATA_READ_INTERVAL"      value="10000">
         <param name="REFRESH_INTERVAL"           value="5000">     
         <param name="DEFAULT_FONT"           value="Arial">
    </applet>
    pass values @ ur html or jsp page to Applet as parameters.
    Refer above code. By using getParameter() method of Applet, u can take values inside applet.

  • How to pass the value from sub report to sub report

    how i want get one value from sub report to sub report..
    can i do this one...
    how can get the value.
    i know main report to sub report
    i tried that way but
    value is  0.00 is comming
    Any reasons.

    Hi Try this.
    Create a formula like this in subreport1 (from the report where you want to pass your value)
    Whileprintingrecrods;
    Shared Numbervar x :={subreport1Value};
    Then go to 2nd sub report and Create a formula like this
    Whileprintingrecrods;
    Shared Numbervar x ;
    Note :Your sub report1 should execute before sub report2 .That means sub report1 should be in the above section of sub report2

  • How to pass the values to stored proc using presentation variable in OBIEE

    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There are 6 reports say ‘A’,’B’,’C’,’D’,’E’,’F’ in the same subject area.
    The reports are being configured with prompts using either the repository/presentation variables.
    One of the reports say ‘A’ has been configured to pass the values using presentation variables from the prompt in Advanced Tab of the report request to the stored procedure defined in the Execute Before Query section of the connection pool.
    After running another report ‘B’ in the same subject area, upon visiting the report ‘A’ view display error is being seen ( Please have a look below screen shot for your reference) .
    Speculate the issue is around presentation variables of report ‘A’ getting initialized even before running the report.
    Appreciate your earliest advise as this is a prod issue.

    Hi Prasad,
    I got your note, you should not use Session variable syntax to call presentation variable.
    you should use like @{AIC_PROJ_PLAT_SEQ_NO}
    One more thing: first test the variable AIC_PROJ_PLAT_SEQ_NO value then try to pass to SP.
    Hope this helps

  • How to Pass the Value of a Textfield as c:param to a Link using c:url?

    I must have done someting wrong.
    I tried to pass the value entered in a textfield:
    <html-el:text property="searchFirstName" />to a link this way:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>and in my action class, I have
    String firstName = request.getParameter( "searchFirstName" );I tried to print out the firstName, I got a blank!
    Please advise what went wrong.

    Further to what I have posted, I did pass some fixed values in my link. They are picked up. Let me explain:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="sortKey" value="firstName" />
        <c:param name="orderKey" value="ASC" />
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>
    <A href=' <c:out value="${ascFirstName}" /> '></A>The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. I got a blank when I write it out using System.out.println in my action class.

  • How to pass the value of an Excel cell to XL Reporter

    Hi guys,
    I'm posting this here because no one could help at yahoo's XLR group.
    My problem is I need to passa the value of an Excel cell to ixGetData.
    Searching I found there where 3 possible ways,
    1)      =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName"; " CardCode ="&B6)
    2)      =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName "; " CardCode =Cell("Contents", B6)”)
    3)      =ixGetData("manager"; "RLH6J"; "[Pelissari].[dbo].[RelContas_a_Receber]"; " CardCode, CardName "; " CardCode = Cell(B6))
    The problem is none of them are working!
    Can anyone help me, please?
    Thanks!
    Edited by: Darius Heydarian on Mar 27, 2008 11:44 AM

    I'm sorry, I dont have the perfect solution.
    I ceated a UDT [@Params] or UDF where the user has to insert the values for XL Reports (for exampel CardCode). After the User inserted the value he can start the XL-Report which are reading from this UDT or UDF the value into the GetData function. You must only insert a query into the condition of GetData :
    =ixGetData("manager"; "RLH6J"; "Pelissari.dbo.RelContas_a_Receber"; " CardCode, CardName"; " CardCode = (SELECT Name FROM [@Params] WHERE ID='XL-CardCode')")
    If you will find some other possibilty please let me know.
    Hannes

  • How to pass the value from one page to another page

    Dear Gaurav
    I have three pages
    1-creation page
    2-search page
    3-creation page
    in first creation page I have column name user write a% and submit to that search for that name.
    it is going to second page (search page)name a% is passed and search that corresponding value,the corresponding values are not there user will call third creation page and enter the details and save and click back to first page the value is not calling passing from third page to first page I submit the button in 3rd page the error is coming like this.
    The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
    Cause:
    The view object xxcrmleadmgmtAM.xxcrmleadmgmtVO contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
    in first page column name I removed view instance and view attribute the value is passing from third page to first page
    my requirement is the value call from 3 to 1 and user will enter remaining fields in 1st page and save the records.
    Regards
    Mahesh

    Hi Mahesh,
    Use
    OA.jsp?page=/oracle/apps/................&retainAM=Y).
    Thanks
    Jegan

Maybe you are looking for

  • Work around of Sy-tcode in SRM 7.0 WEB DYNPRO

    hi , we are currently upgraded from srm 5.0 to SRM 7.0 . In 5.0 we have used SY-Tcode as BBPSC01 , BBPSC02 , BBPSC03 .. 07 , 08, 04 ... AS SRM 7.0 does not support SY-Tcode .. Then how can we distinguish what action is performed by user. I my case sa

  • During down payment of asset po  can any body solute the problem

    the following message is coming during down payment of asset po **purchase document allocated to asset** Purchase document is allocated to asset Message no. F5378 Diagnosis The asset number   assigned in the purchase document is different from the as

  • Bex Exception Aggregation in 3.5 equivalent to 'TOTAL'

    Hi All, Can anyone help me in getting a functionality equivalent to exception aggregation 'TOTAL' in BW 3.5. I have  a requirement which can only be fixed using the exception aggregation 'TOTAL', my bad in my current client they dont have BI 7.0. So

  • Extraordin​arily poor customer service & two weeks to replace a settop box???

    Can Verizon explain the huge decrease in your customer service over the past several months? After being a Verizon customer for nearly 20 years, we are in the process of looking for an alternate service provider after spending a week with your custom

  • My tab groups did not restore on restart. One was related to my job.

    I accidentally closed my Firefox window by clicking the upper-right-hand "X;" when I restarted Firefox, none of my tab groups were restored; I got the home page. I can't click on "History/Restore Previous Session." One of my tab groups was related to