Modify Function and Conditional Where

I am a newbie to the Oracle world. I am working on an Oracle 8.1 system. I have experience with Microsoft SQL Server.
I have two issues that are related to Oracle, many that are not.
- first how do I go about altering a function that is currently in the database, I would like to pull the contents into an editor so that I can see how it is currently working
- second, i have a parameter that is being passed into the function above, it usually holds a value but now the developers would like to be able to pass a % meaning don't use the criteria. Is it possible to modify the function to use the parameter in the where clause if it doesn't equal %, but don't include it if it does
Thank you for assisting me while I travel in the dark

This is one way:
AND ( SEWN.STYLE.BUSINESS_UNIT_ID=SEWN.STYL_COLO_IDENTIFIER.BUSINESS_UNIT_ID
and SEWN.STYLE.STYLE_ID=SEWN.STYL_COLO_IDENTIFIER.STYLE_ID )
AND ( SEWN.LABEL.BUSINESS_UNIT_ID = BusinessUnitId
AND SEWN.STYLE.STYLE_ID >= DECODE(FromStyleID, '%', SEWN.STYLE.STYLE_ID, FromStyleID)
AND SEWN.STYLE.STYLE_ID <= DECODE(ToStyleID, '%', SEWN.STYLE.STYLE_ID, FromStyleID));[pr]
John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Function and Department of contactpersons - how to read the texts

    Hello,
    we use at the level of contact person the fields FUNCTION and DEPARTMENT where codes represent a function or department.
    My question is how could we read the texts in users language for the codes in this fields?
    Are there function modules we could use?
    Thank you.
    Kind regards
    Manfred

    hi,
    Use FM BUPR_CONTP_GET_DETAIL to get the codes of Function and department.
    Read the language of the user
    Pass those codes along with language to TB911 --> Departments and TB913 --> functions to get the descriptions repectively
    Regds,
    Raghu

  • In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    In the latest verision of ITunes (downloaded yesterday) I can no longer see how large (in GB's) my music library or playlists are.  This is a very valuable function and it seems to have disappeared.  Anyone know where it is?

    Go to the View menu and turn on the Status Bar. If you don't see the menus, go to the small icon with the arrow at the extreme upper left and select "Show Menu Bar":
    Regards.

  • I downloaded a movie from itunes on my ipad.  In the downloaded area where the movie should be, I only get a link to "iItunes Terms and Conditions", no movie.  There is nowhere to accept the terms and conditions.

    I downloaded a movie from itunes on my ipad. In the downloaded area where the movie should be, I only get a link to "iItunes Terms and Conditions", no movie. There is nowhere to accept the terms and condotions.

    Nevermind, the movie was there in the Videos app, not itunes downloads.  Thanks.

  • While updating my ipad to ios7, I could not pass the terms and conditions screen where I had to agree or disagree. It just didn't move pass that screen. I can't do anything to go forward or back. It's just stuck there.

    While updating my ipad to ios7, I could not pass the terms and conditions screen where I had to agree or disagree. It just didn't move pass that screen. I can't do anything to go forward or back. It's just stuck there.

    Try to reset the device:
    Device Reset (won't affect settings/data/music/apps/etc)
    1. Press and hold (& continue to hold) BOTH the Sleep/Wake button & the Home button.
    2. Continue to hold BOTH (ignoring any other messages that may show) until you see the Apple logo on the screen.
    3. Release BOTH buttons when you see the Apple logo and allow the device to boot normally.

  • I got four emails for the icloud and they are all terms and conditions and i cant find the agree button. where is it in the email?

    I got four emails for the icloud terms and conditions and i cant find the i agree button in the email . Where is it?

    It is not properly connected to the network.
    Make sure location is set correctly
    DNS should be on auto (settings - general - network)
    Try ethernet
    Signal strength on device won't account for issues, you would need a network report from istumbler, netstumbler or similar. This will show accurate signal strength along with noise and nearby networks

  • Oracle stored functions and where clauses

    Hello everybody,
    I need to call an Oracle stored function and at the same time do a select on
    the result of the query, it works well except when I use a where clause. I
    am connecting to Oracle 8.1.7 through OLEDB using the Oracle provider for
    OLEDB distributed with this Oracle version.
    Here is the query I am doing:
    select * from {call MC.SEC.QryTermbases(?, ?) where ID = ?}
    If I remove the where clause it works well but I need to use the where. I
    know that I could pass the parameter to the procedure instead of doing that
    in the select but there are places where I can not do that since the SQL
    query is generated dynamically. The code above is just a demo.
    Thanks very much for your help,
    Jose.

    Thanks for answering, it is actually possible to do a select on the return of a function, I have tested it with other than "select *" and it has worked well. What has not worked for me is using a "where" clause. That is "select" without "where" has worked but not with the "where".
    I also suspect that it does not work but similar queries work well in MSSQL 2000 and Interbase 6.0 so I thought may be there was a way to do that with Oracle. That is in MSSQL I can treat the result of a function as a normal table and I can do the same thing with a stored procedure that returns a recordset in Interbase.
    Thanks again for answering,
    Jose.

  • Empty WHERE Clause with AND condition after

    I have a question concerning a SQL query that I am using for a report. I have converted an old report to Crystal Reports 2008 and the resulting SQL query no longer works.
    After the conversion all the inner joins that were previously used in the report were moved to the FROM clause.
    My resulting WHERE clause is as follows:
    WHERE   AND
    "TABLE"."TABLEKEY" IS NOT NULL
    I get this error message:
    ORA-00936 Missing expression
    As you can see there WHERE clause has nothing before the AND condition because all the inner joins have moved to the FROM clause in the new version of Crystal Reports. I am fine with these inner joins moving but how do I take care of this empty condition.
    Any help is appreciated.

    Hi Joshua
    Please go through the following SAP note which deals with similar type of issue.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333533393334%7D.do
    Thanks

  • CBO and functions in the WHERE clause

    Hi,
    Can anyone point me to any documents describing how the cost based optimizer treats functions in a WHERE clause?
    For example, in
    select ...
    from   ...
    where  ...
    and    my_package.my_function( t.some_column ) = 'Y'
    ...does the CBO treat "my_package.my_function" as a black box or does it go into the body of "my_package.my_function" and take into consideration the associated costs of all the SELECT statements in the function?
    I've tried a few simple tests to answer the question, but I've received conflicting results. Has anyone had any experience with this?
    Thanks in advance for your help.

    Thanks for the info. Justin.
    <br><br>
    I think I've solved my problem, but I'll repeat it here in case it helps anyone else. Here is a very simplified example of what I was seeing.
    <br><br>
    A query like this:
        select
          a.party_id, b.cust_account_id
        from
          hz_parties a,
          hz_cust_accounts b
        where
          a.party_id = b.party_id
          and mis_hz_merge_veto_pkg.party_merge_will_be_vetoed(a.party_id) = 'N'was returning a drastically different execution plan than this
        select
          a.party_id, b.cust_account_id
        from
          hz_parties a,
          hz_cust_accounts b
        where
          a.party_id = b.party_id
          and mis_hz_merge_veto_pkg.account_merge_will_be_vetoed(b.cust_account_id) = 'N'I initially thought the difference was due to the fact that I was using different functions in the last line, but then I tried this version
        select
          a.party_id, b.cust_account_id
        from
          hz_parties a,
          hz_cust_accounts b
        where
          a.party_id = b.party_id
          and mis_hz_merge_veto_pkg.party_merge_will_be_vetoed(b.party_id) = 'N'and found that it gave me a different execution plan than the first SELECT as well, even though it used the same function. The difference seems to stem from the columns I use in the function parameter and not the choice of function.

  • I have Final Cut Pro X (10.0.9) and would like to change my project settings but I am having trouble finding the 'Modify Settings button.'  Where exactly is it located?

    I have Final Cut Pro X (10.0.9) and would like to change my project settings but I am having trouble finding the 'Modify Settings button.'  Where exactly is it located?  Here is the link which gives the instructions but doesn't seem to say where the 'Modify Settings Button' is located: http://support.apple.com/kb/PH12526?viewlocale=en_US

    You have to choose – one settigf or another.
    The thing is.your HD clips will look better in an SD project than your SD clips will in an HD project.
    WIthout knowing much more about your project and the kind of content, it's really hard to be specific. But generally I'd let my project settings be guided by what fraction of my timeline will be made up of HD clips and how much SD clips. If it's 75% HD, I'd probably do an HD project…and so on,
    Good luck.
    Russ

  • Modify existing rebate condition and exclusion

    Hi
    We are rebate agreements for customers. Currently I want to modify rebate condition in one of rebate agreement.
    Scenario: let us June 10th 2010 onwards, the rebate % is 3% for Profit center 'xxxx' & customer 'yyyy' instead of 1%. And 3% needs to accrued on billing docs going forward. How to set up this.
    I tried to modify existing rebate condition using VBo2 as follows: went into rebate agreement using VBo2, changed rebate % for condition record with effective from 06/11/2010 and Saved.  problem when I ran VBOF program, system posted reversal accrual for old rebate condition 1%. Old condition record validity from 01/01/2009 Valid to 12/31/2011.
    I have one more question. We want to set up rebate condition for all materials exclude some of them. we have thousands of materials for which we need to calculate rebates. but we want to exclude some materials in the rebate agreement. How to set up such exclus
    any ideas really appreciated
    thnx

    The key of your condition table (the one supporting your condition record in the agreement) is evidently Profit Center / Customer.  So for any combination of profit center and customer, you can maintain a rate and validity period. 
    You are attempting to maintain two separate records having the same key.  As you have experienced, the system does not allow it.
    The simple solution is to expire that rebate agreement and start a new one with the updated validity period and conditions.
    As for excluding certain materials, you need a more detailed key in your condition table.  Something else from the material master seems appropriateu2014Commission Group for example.  Maintain commissionable materials in group 01 and non-commissionable ones in group 02.  Then a key combination of Commission Group / Profit Center / Customer  would work well for you.
    Regards,
    Ken

  • I can't find where to accept new iTunes terms and conditions "agree " button ?

    I can't find where to accept new iTunes terms and conditions "agree " button ?
    Please help ?

    Go on to your computer and log into itunes go to download ain app thats new and the terms and condtions will pop up. click 'I have read the terms and conditons' click 'agree' and it should be done across all of your devices hope this helped

  • Where to store the PO: Terms and Condition file For printing it in PO

    Hi All,
    I want to add Terms and condition in my PO: Print output which is coming in PDF. I got the Profile name, which is --PO: Terms and Conditions filename. But i am not getting where i have to store the file on server and what i need to give the value for this profile. I had customized the PO_STANDARD_XSLFO template. Now only remaining thing is that i want to add the Terms and Conditions.
    Should I hardcode it in the XSL-FO Template???
    OR what value i should give to this profile option?
    Regards
    Ravi

    Ravi
    Check the thread
    How to add Terms and Conditions in Standard PO XSL-FO template
    Vicha

  • Where is the accept button for the new terms and conditions

    After scrolling through 54 pages of the new terms and conditions, lo and behold there isn't an accept button.  Where is it?

    I installed the upgrade last night on my imac and accepted the new terms without any problems.  My problem is with the itunes store app on my iphone 4s.  When I click on the app, there is a white page and at the bottom of the white page there are the categories music, tv shows and etc and nothing else. In the app store app, I try to update apps and I get a prompt to read and accept the new terms and conditions.  After scrolling through 54 pages, there isn't an accept button on the last page.  Where am I supposed to agree to the new terms and conditions for my phone when there isn't an accept button?  Is the itune radio replacing the itune app store?

  • Where is the "accept" button for iTunes Store Terms and Conditions on the iPad?

    Where is the "accept" button for iTunes Store Terms and Conditions?  Can't use iTunes on my iPad without accepting conditions.

    Which tab in the iTunes app are you in ? If you are in the Downloads tab then the Ts & Cs link shows if you don't have any outstanding downloads - your download and synced films and TV shows should be in the Videos app and your music, audiobooks and audio podcasts in the Music app

Maybe you are looking for