Passing Relational operator along with input

Hi friends
I have a procedure
get_emp_list(p_sal in varchar2
p_out out sys_refcursor)
as
begin
open p_out
for
select * from emp
where sal (=,<,>) p_sal;
end;
Friends pls help me in writing the query,
The input will be like <1000 or >1000 or =1000.
Relational operator will be passed as a input in p_sal
I have to take the output based on the input values.
Pls give me any tips
Rajesh

or more accurately as per your requirements...
procedure get_emp_list(p_sal in varchar2, p_out out sys_refcursor) as
begin
  open p_out for
    select * from emp
    where (substr(p_sal,1,1) = '=' and sal = to_number(substr(p_sal,2)))
    or    (substr(p_sal,1,1) = '<' and sal < to_number(substr(p_sal,2)))
    or    (substr(p_sal,1,1) = '>' and sal > to_number(substr(p_sal,2)));
end;However this assumes the operator will only be a single character so you'll have to alter accordingly if you want to deal with <=, >= etc.

Similar Messages

  • How to pass header Variables along with body

    Hi,
    Here I am invoking siebel web service which is wsdl(SOAP) based web service. I tested it through sopaUI and it is working fine for me as I am getting proper response. here is the input payload structure.
    Note: it is running on HTTPS, so SSL has been applied to this  site.
    it is loading as http not https. For every operation when we make a request, we are changing the link to https and submitting it. Then it is working for us.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.xxxxxx.com/2005/">
       <soapenv:Header>
          <ns:AuthorizationToken>
             <ns:Token>userName;Password</ns:Token>
          </ns:AuthorizationToken>
       </soapenv:Header>
       <soapenv:Body>
          <ns:WEBIndividualGet>
             <ns:key>{6D803C43-3917-4C99-91F3-003EB9E16E1F}</ns:key>
          </ns:WEBIndividualGet>
       </soapenv:Body>
    </soapenv:Envelope>
    Now I created the bpel projects like this.
    Step 1:- in the xsd, I created two elements types
    <xsd:element name="UsernameToken" type="xsd:string"/>
        <xsd:element name="PasswordText" type="xsd:string"/>
    Step 2:- Then I created the WSDL in respect to above elements
    <!-- Message section -->
    <wsdl:message name="WEBAutTokenOut">
      <wsdl:part name="userName" element="netObj:UsernameToken"/>
      <wsdl:part name="passWord" element="netObj:PasswordText"/>
    </wsdl:message>
    <wsdl:portType name="portTypeName">
      <wsdl:operation name="operationName">
      <soap:operation soapAction="sopaAction">
      </soap:operation>
       <wsdl:input message="netSer:SvcRequestMessage">
        <soap:header message="netSer:WEBGetAutToken" part="userName" use="literal"/>
        <soap:header message="netSer:WEBGetAutToken" part="passWord" use="literal"/>
       </wsdl:input>
       <wsdl:output message="netSer:SvcResponseMessage">   
        <soap:header message="netSer:WEBAutTokenOut" part="userName" use="literal"/>
        <soap:header message="netSer:WEBAutTokenOut" part="passWord" use="literal"/>
       </wsdl:output>
      </wsdl:operation>
    </wsdl:portType>
    Step 3:- and My Bpel looks like
    <!--Variable Declaration -->
    <variable name="customHeaderVar" messageType="netSer:WEBGetAutToken"/>
        <variable name="customOutputHeaderVar" messageType="netSer:WEBAutTokenOut"/>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="xxxxxxx"
                 portType="netSer:xxxxxxxxxxx" operation="xxxxxx"
                 variable="inputVariable" createInstance="yes"
                bpelx:headerVariable="customHeaderVar"/>
    <assign name="AssignHeaderVariables">
          <copy>
            <from expression='"username"'/>
            <to variable="customHeaderVar" part="userName"
                query="/ns2:UsernameToken"/>
          </copy>
          <copy>
            <from expression='"soa1234"'/>
            <to variable="customHeaderVar" part="passWord"
                query="/ns2:PasswordText"/>
          </copy>
        </assign>
    <invoke name="Invoke" inputVariable="xxxxxxxxxxxxxxxx"
                outputVariable="Invoke_OutputVar"
                partnerLink="xxxxxxxxxxx" portType="ns1:XMLSoap"
                operation="WEBGet" bpelx:invokeAsDetail="no"
               bpelx:inputHeaderVariable="customHeaderVar">
                bpelx:outputHeaderVariables="customOutputHeaderVar"/>
    Note:  When I am hitting siebel web service it is giving some out put, The output it self has header variable. so that is reason am added outputHeaderVariables.
    < Here we have Transformation Activity >
    <reply name="replyOutput" partnerLink="xxxxxx"
               portType="netSer:xxxxxxx" operation="WEBGet"
               variable="outputVariable"
               bpelx:inputHeaderVariable="customOutputHeaderVar"/>
    That's about my project. But when test this service Am getting error. below is the error details.
    ==============================================================================
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
       <env:Header/>
       <env:Body>
          <env:Fault>
             <faultcode>env:Client</faultcode>
             <faultstring>System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object.
       at Avectra.netForum.xWeb.xWebSecure.netForumXMLSecure.WEBIndividualGet(Guid key)</faultstring>
             <faultactor/>
             <detail>
                <exception><![CDATA[<InvalidTokenException xmlns="http://www.xxxxxx.com/2005/">
      <XWebException xmlns="http://www.xxxxxx.com/2005/">
        <Message>Object reference not set to an instance of an object.</Message>
        <Number>0</Number>
        <Source>xWebClasses</Source>
        <Line>0</Line>
        <StackTrace>   at Avectra.netForum.xWeb.xWebSecure.xWebServiceClass.ValidateToken(AuthorizationToken AuthToken)
       at Avectra.netForum.xWeb.xWebSecure.netForumXMLSecure.WEBIndividualGet(Guid key)</StackTrace>
        <ErrorType>GeneralError</ErrorType>
        <Errors/>
      </XWebException>
    </InvalidTokenException>]]></exception>
             </detail>
          </env:Fault>
       </env:Body>
    </env:Envelope>
    ==============================================================
    Could you please help me out.
    Thanks,

    The UserNameToken and the Password variables should be created based on the schema http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
    Refer the below url for more details.
    OracleFusionMiddleWare 10g,11g and AIA: How to set security credentials dynamically in Oracle BPEL
    Regards
    Albin I
    http://www.albinsblog.com/

  • BP Selection by Role- Problem with relation operator

    Hai Experts,
    I am using  sandbox system. I am trying to search Business Partner by role, when I give the role as BUP002(Prospect) and enter, the system is throwing a message that "BP Role BUP00 does not exist" and i have checked the relation operator which will be available next to the BP Role(when we input the role as BUP002), the relation has been set it as " Role=BUP00" , because we do not have any role with BUP00,hence the system is throwing that message. Now i need your help where do we set that relation may be in configuration or customization.Kindly provide me the exact path and way to do it.
    Thanks and Regards,
    Teja

    Hi Teja,
    Please check the SPRO settings, just follow the path below
    SPRO->Click SAP Reference IMG->Customer Relationship Management->Master data->Business Partner-> Basic settings->Assign template for content managment folder to BP roles,
    Just check it, here there is a view that u need to maintain.
    Just check it I am not so sure about, as I dont have a local system in which I can try it. So check it and let me know if it is working fine.
    Have a grat day ahead.
    Thanks and Regards,
    Antony Thomas

  • How to invoke crystal reports from Oracle forms 11g R2 along with passing p

    How to invoke crystal reports from Oracle forms 11g R2 along with passing parameter to it.
    how to pass parameters to crystal report, please help.

    how to pass parameters to crystal report, please help.This would entirely depend on crystal reports and you might find informations on crystal reports related communities more likely...I for one have seen crystal reports the last time about 12 years ago. And even back then I simply acknowledged it's existence instead of working with it.
    Maybe crystal reports can be invoked via a URL call which would make it simple as you'd need simply build an URL and show the report using web.show_document. But that's pure speculation. Also you might not be the first with this requirement, so the solution to your problem might be right under your nose and just a little google search away ;)
    cheers

  • (Sales & Operations Planning) - Can we use RMCPSOP along with IDoc method

    Hi,
        While transferring data to demand mgmt(SOP) using the standard mass processing, sometimes the job is getting failed with error u201CNo period unit maintained in material masteru201D, after analysing the code which is triggering this error, we found that when ever an S076E is not the for corresponding Planning entry, it is triggering the error. 
         We are using the standard mass processing job using IDoc method to update S076((Sales & Operations Planning), we found that sometimes the S076E table was not getting updated with the Material/Plant combination. As suggested in SAP Note 500354 Program RMCPSOP can be used to synchronize S076 and S076E tables. Seeing the technical description of the suggested program it will create S076 and S076E entries based on PGMI and PGZU tables.
    My question is
    1) Can we use the RMCPSOP along with IDoc method, does it overwrites the S076 entries which were updated with IDoc method?
    2) At what step should the RMCPSOP executed if we use IDoc method.
    Regards
    Bala Krishna

    > I am planning to use WMMBID02 for it.
    > Although I found in Std SAP it is available for inbound only but I feel we can generate this idoc using user exit available at the time of "material document posting".
    >
    If you find nearly all the fileds which are asked by ur partner in that idoc, thats fine.
    > my second query is , in this idoc along with other information we also have to send information related to "REASON CODE" and "To Stock Status" ( Like in case material is transferred from Blocked to unrestricted stock type and To Stock status will be Unrestricted ) but these fields are not available in idoc defination , what should I do ?
    >
    You can extend the idoc, if you still think that you are having enough fileds in standard idoc, which are usefull.
    Reddy

  • Help in passing parameters along with  URL

    Hi All,
    I have a small web application in which I am passing some details to a servlet along with url.
    http://localhost:8080/Test/orderDetails.do?OID-67856
    When I am checking req.getParameterNames(),I am able to see paramname 'OID-67856'
    in Jboss .But not able to see the same in WAS .What is the exact pattern we need to follow when we pass parameters?
    Do we strictly need to follow paramName=paramValue pattern in order to work this on all application servers?
    It will be great if someone share me any specification documents regarding this .
    Thanks in advance.

    798185 wrote:
    Hi All,
    I have a small web application in which I am passing some details to a servlet along with url.
    http://localhost:8080/Test/orderDetails.do?OID-67856
    When I am checking req.getParameterNames(),I am able to see paramname 'OID-67856'
    in Jboss .But not able to see the same in WAS .What is the exact pattern we need to follow when we pass parameters?
    Do we strictly need to follow paramName=paramValue pattern in order to work this on all application servers?
    It will be great if someone share me any specification documents regarding this .
    Thanks in advance.Well, try turning it into ?OID-67856= (so an empty value) and see if it starts to work on WAS. Would have been a test of a few seconds, posting this question took you at least a minute.
    If even after trying it out you want hard proof, you should check the HTTP specifications (google for 'rfc http').

  • Case with where clause - ORA-00920: Invalid relational operator

    Hi All, when I try to run the query below, I get the following error...
    ORA-00920: invalid relational operator
    00920. 00000 -  "invalid relational operator"
    *Cause:   
    *Action:
    Error at Line: 16 Column: 5
    Does anyone know what's wrong with my query? thanks in advance.
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END as "MonthNo"
    ORDER BY CONCAT (year,"MonthNo") DESC

    The problem is the as "MonthNo" - you can't give an "AS" alias to an expression in a where clause.
    You have not actually given any condition, just a set of translations from period into a number.
    You also haven't said what you're trying to do.
    Perhaps you want:
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE something
    ORDER BY CONCAT (year, CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END  ) DESC

  • Can you pass a hidden value along with your select option in the form selec

    Can you pass a hidden value along with your select option in the html form select

    Off topic. Locking.

  • I currently have Mac OSX 10.4.11, and I just purchased OSX Snow Leopard. Can I keep my original version of iMovie along with the new one when I download the new operating system?

    I currently have Mac OSx 10.4.11, and just purchased OSX Snow leopard.  Can I keep my original version of iMovie along with the new version when I download the new operating system?

    I purchased the Mac Box Set which includes Snow Leopard, iLife, and iWork.  So after downloading the box set, will I be able to keep my iMovie 6.0.3?

  • Preventive maintenance plan along with operations with frequency

    Hi gurus,
       I want tables or T code which can give me Preventive maint plan along with operations with frequency as a list view.
    I tried ip19, ip24 but results are not satisfactory to me.
    Can anyone suggest me the answer.
    Regards,
    Yogesh

    Hi Bartlomiej
          Do you have any solution for this?

  • I'm picking up all of the data script related to the sending / receipt of an e-mail along with the e-mail itself and can't find a way of not showing the text. Obviusly only a command but can't find it!

    I'm picking up all of the data script related to the sending / receipt of an e-mail along with the e-mail itself and can't find a way of not showing the text. Obviusly only a command but can't find it! Help!

    Shift-Command-H is the key-combo to switch 'Long Header'/'Standard Header' .
    Long way: Top Menu -> View -> E-Mail
    Stefan

  • Witihin same operation we have 10 machines , user wants to indivual mapping along with operation

      hi,
      within same operation we have 10 machines , user wants to individual mapping along with operation, when we are creating the production order it is showing under the 10 operation number we have 10 workcenter and system will provide to confirm the confirmation where the actual production is happened ,
    please help me , it there any way to map the process in SAP.

    Hello Abhishekd
    You question is not exactly clear, as you have already described the entire process on SAP.
    I would create a separated work center for each machine and for each work center an operation on the routing.
    During the order confirmation, you can choose if you want to confirm the operation individually or post a header confirmation on CO15.
    For more details about how to create the work center, routing and order, check the following documents:
    http://scn.sap.com/docs/DOC-52403
    CRP Basic Settings Part 2 – Routing
    CRP Basic Settings Part 3 – Production Order
    BR
    Caetano

  • How to solve the problem related with inputing of the text into Wordpress from Firefox 9 and 9.0.1. The problem is that after inputing the formatting gets lost. Taking in account high popularity of Wordpress I suppose the problem is quite serious.

    How to solve the problem related with inputing of the text into Wordpress from Firefox 9 and 9.0.1.
    The problem is that after inputing the formatting gets lost.
    Taking in account high popularity of Wordpress I suppose the problem is quite serious.

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    * Clipboard not working -> [http://kb.mozillazine.org/Clipboard_not_working]
    * Rich Text Editing -> [http://kb.mozillazine.org/Rich_text_editing]
    * Update All your Firefox Plugins -> [https://www.mozilla.org/en-US/plugincheck/]
    Check and tell if its working.
    Might not be related to your problem but some of your Plugins are out-dated
    * Update All your Firefox Plugins -> [https://www.mozilla.org/en-US/plugincheck/]
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''

  • Procedure for gate pass along with billing document?

    Hi
    any body know the procedure about "issueing gatepass along with billing document"  ..?
    anybody can suggest me ..regarding gatepass configuration procedure..?
    thanks and regards
    sesidhar

    this is not for excise materials
    for general materials  ....
    when PGI of materials ..automatically can issue the gate pass
    mean at delivery time
    regards
    seidhar

  • Passing parameters along with portlet publishing url

    Hi All
    Any idea if portlet publishing url can take some custom parameters along with the publishing url when using disc api
    Thanks

    Hi Muthaiah,
    Is this IView a Web Dynpro IView. If yes then you can easily do this by simply adding a Url parameter to the default inbound plug of the interface Controller of your WD application.
    You can refer to this link: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/webdynpro/inter-application-navigation%20in%20web%20dynpro.pdf">Tutorial 15</a>, <a href="/people/jochen.guertler/blog/2004/11/23/web-dynpro-best-practices-how-to-navigate-between-different-web-dynpro-applications Blog</a>
    Do reward points if it helps.
    Regards
    Sid

Maybe you are looking for

  • Could anyone help me with my program

    Hi i have a piece of code which i want to improve. The two methods are SplitTextArea and SplitGlossArea. SplitTextArea, looks at the black and white parts of the page and uses this to separate sentances from eachother by detecting where the sentance

  • Every time I import a vcard, contacts says, it is duplicate. But it is totally different.

    Have had activated iCloud 1 years ago, but only for 1 week. Now I don't use the cloud. any hint to fix this issue?

  • Convert path to hyperlink from SQL Server 2000 to JSP

    Hello,           I have the following fields in my database table:           report_key           (not shown on JSP)                report_name           (on JSP)           path                (not shown on JSP)           user role/right      (not sh

  • Highlight specific rows in tableview

    I realize that my use of the word highlight is somewhat ambiguous, in the docs its seems to be synonymous with selected. My question is: can you choose to set a background color, or somehow otherwise mimic highlighting for specific rows in a TableVie

  • SAP ERP - Demand Planning and Forecasting

    Dear all,    my customer is a wholesale company. They want to use a component in SAP ERP (not SAP APO), in order to make demanding planning and forecasting for the materials , quantities and dates they should make the purchases in order to cover the