Some way for to order ASC  or DESC

Hi
is there some way for a query to order ASC or DESC when the user to pass 1 or 2 in parameter
EXPLAIN
   Select  column1,column2...column3
      from  mytables
       WHERE .....
      ORDER BY   -- here I must put ASC  if user put 1 in Parameter in Procedure or  DESC
        if user put 2tia

if u query is in some plsql program and u want to
pass the column name as variable then u can use
dynamic sql
execute immediate..
or dbms_sqlApart from the "y" and "o" keys being broken on your
keyboard (I think the word you're looking for is
"you") I assume you are referring to building up a
query string such as...
create or replace procedure myproc (asc_desc IN
VARCHAR2) is
declare
v_str VARCHAR2(32767);
gin
v_str := 'SELECT * FROM mytable ORDER BY 1';
IF asc_desc = 'D' THEN
v_str := v_str || ' DESC';
D IF;
EXECUTE IMMEDIATE v_str;
d;
/The problem with building dynamic SQL in such a way
is that you are liable to prevent query re-use and
cause hard-parsing of the query to build the
execution plan, especially if there are other factors
of the query that are dynamically built in (bind
variables permitted).
Where possible, pure SQL with bind variables should
be used to ensure performance and query re-use within
the optimizer.
;)Thank , But I must return a cursor to Java

Similar Messages

  • Please give some inputs for Sales order costing

    please give some inputs for Sales order costing

    Dear Chandu
    If you use the valuated sales order stock, the actual cost of goods manufactured is updated to the sales order item (item in an inquiry, quotation, or sales order) under an inventory change cost element.
    If you use the nonvaluated sales order stock, the actual cost of goods manufactured is updated to the sales document item under a settlement cost element or a source cost element.
    Sales and administration costs are updated under a separate cost element.
    Thanks
    G. Lakshmipathi

  • Is there some way for me to write to a file using JavaScript in LiveCycle

    Hi there,
    Our client has a requirement to be able to print off all validation messages from a partially completed e-form.  What I would like to do it create a text string and write it to a file so that the user can print it off.
    Is this possible to do using JavaScript in LiveCycle?
    Thanks,
    Kieran

    You'll have to get a Dremel motor tool and some fine metal bits, make a jig to hold the Dremel so it's stationary, then a slider jig for the MacBook Pro so the bit can drill into the center of the stuck plug.
    Gently push the MBP against the drill bit so it drills into the stuck plug.
    Once the hole is drilled down deep enough, use some metal to metal epoxy resin to glue the bit into the drilled hole, then let it set up according to directions.
    Take a pair of vise-grips and get a good grip on the bit portion sticking out and gently pull it straight out, if you bend or twist, you can snap off the bit.

  • Some songs on iTunes have swears in them but are not marked with an "EXPLICIT" sign. Is there a possible way for you to fix this? And is there some way for me to send a list of songs that I have come across so that customers know what they're buying?

    Here is a list of songs on iTunes that I have bought that need to be marked with an explicit sign:
    Maroon 5:
    "Harder to Breathe"-Songs About Jane
    Goo Goo Dolls:
    "Don't Beat My *** (With a Baseball Bat)"-Goo Goo Dolls
    "Up Yours"-Jed
    "James Dean"-Jed
    "There You Are"-Hold Me Up
    "Out of the Red"-Hold Me Up
    "Lucky Star"-Superstar Car Wash
    "Close Your Eyes"-Superstar Car Wash
    "Only One"-A Boy Named Goo
    "Cuz You're Gone/1000 Words"-Live in Buffalo, July 4th
    "Slide"-Live in Buffalo, July 4th
    Avril Lavigne:
    "Push"-Goodbye Lullaby
    "Wish You Were Here"-Goodbye Lullaby
    "Smile"-Goodbye Lullaby
    "My Happy Ending"-Under My Skin
    Aerosmith:
    "Mama Kin"-Aerosmith
    The Cult:
    "Lucifer"-Choice of Weapon
    Green Day:
    "Burnout"-Dookie
    "Having a Blast"-Dookie
    "F.O.D."-Dookie
    "Brain Stew"-Insomniac
    "Jaded"-Insomniac
    Linkin Park:
    "Wretches & Kings"-A Thousand Suns
    P!nk:
    "Can't Take Me Home"-Can't Take Me Home
    Here's one song that SHOULDN'T have a sign on it:
    "Before the Lobotomy"-Green Day

    This can be done easily with ethernet.
    Please follow the instructions strictly.
    To make it easier I want you to do this overnight so you can turn off all your current connection to the internet.
    Just go to the airport fan in to the top right and turn airport off.
    Get ethernet cable and connect the laptop to the TC lan port.. ie <-> ones.
    Press and hold the reset on the TC for about 10sec. until the front led flashes rapidly.
    Open the airport utility.. go to manual setup and change the wireless to off. (so other people around you cannot join your network of one).
    Ignore all the errors.. they won't stop the backup working.
    Go to the TM and reselect the backup target disk as the TC.
    It should start after 2min and run through to completion.
    That is it.. for a backup of many GB it might take a few hours.. so make sure the laptop has power plugged in and the sleep is off.. (on early ones I think this is needed but I am a late arrival to the scene).. sleep doesn't affect later OS.

  • Hiding some characteristics for specific type of sales document

    Hi ,
    Can we use EXIT_SAPFV45S_002 and make sure some characteristics values appear for contract only and some appear for sales orders only?if there are 5 appearing totally make them all appear for contracts and only 2 are allowed to appear for sales orders.Is there any exit that can achieve this?Variant configuration is not able to take care of the document type(functionally).Please help.
    Regards,
    Savitha

    Hi,
    check this user exit
    V45W0001            SD Service Management: Forward Contract Data to Item
    Reward points if useful..
    Regards
    Nilesh

  • Results Analysis for Sales Orders

    Hi
    When i am calculting Results Analysis for Sales Orders as a part of Month End Closing Activities there are some errors for few orders...
    Msg Type: E
    AppAr: KJ
    MsgNo: 216
    Message Text: Planned Cost for Valuation are 0. Please Check the Object.
    Can any one tell me what might be the error..
    Thanks in Advance..
    Sivaram

    Hi,
    The error is offen caused by one or possible more than one of following statements:
    - the delivery block of the order is set
    - the billing block is set
    - the schedule line ( confirmed quantity ) is missing
    - the position has been cancelled
    - price condition is missing
    In case no one of the mentioned options wouldn''t help, set the position status to technically completed, if the position is processed as well ( delivery, invoice, etc. ).
    We often face this kind of issue
    Good luck
    Marian

  • My daughter ordered some music for her ipod and pressed twice the order key: I got two bills of 72.74 euros... what can I do to get reimbursed of one of the bills?

    A few days ago she asked to use our account to order some music. When she pressed the order key, the site told her that there were delays and that she had to wait  and try later.
    Well she tried a few seconds later, and Bingo she could find her music. The next day I received confirmation for 2 orders of the same amount... and today the Credit card statement indicates 2 amounts of 72.74 euros deducted from my account... Is ther any way I cant write to itunes, with my bank statement and copies of the confirmations of the orders? Is there any address in Europe or should I try the one in the states?
    Thank you for helping me, my daughter does not have a lot of pocket money...
    Pascale

    In iTunes go to iTunes Store > Account (right column) > Purchase History > See All > Report a Problem. Explain that it's a duplicate purchase and within a few days you should receive a refund.
    There is also a Report a Problem link on the receipt you should have received by email.

  • I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I am not aware of a way except for photos that allows you to select multiple files in an email. I even checked settings in the Adobe Reader app, and it does not show that ability.

  • When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message 'An error as occurred. Please try again later'. It has been this way for some weeks. I don't have this problem using Safari or Opera.

    When ever I try to watch any video, from a link or YouTube say, using Firefox, I get a message ‘An error as occurred. Please try again later’. It has been this way for some weeks. I don’t have this problem using Safari or Opera.

    I believe that our “Werbung problem” adds an additional second hyperlink to the pop-up window. This second link is activated whenever you trigger a saved hyperlink to a Mail.com site.
    I had the same problem and eliminated it by deleting all bookmarks, hyperlinks and automatic links that take firefox to a mail.com address. So I just deleted all bookmarks I had saved for mail.com. I also changed my home page link because it also went to my email at mail.com. I then did a warm boot, opened firefox and re-saved my bookmarks and homepage to the desired addresses. Good luck.

  • Like 4 years ago i bought some TV shows. That computer is long gone. Is there any way for me to download them again?

    Like 4 years ago i bought some TV shows. That computer is long gone. Is there any way for me to download them again?

    See Here for 
    Download Past Purchases
    http://support.apple.com/kb/ht2519

  • HT201272 I want to download a previously purchased album that had an "error" and isn't complete. I have an older Mac and don't have iCloud. Surely there is some way to get the music I paid for!

    I want to download a previously purchased album that had an "error" and isn't complete. I have an older Mac and don't have iCloud. Surely there is some way to get the music I paid for!

    Hi,
    See this http://support.apple.com/kb/ht2519
    Jim

  • HT1473 I am having to recreate my itunes library and do not understand why prior album artwork appeared in my older library but not the new library?  Is there some way to scan itunes for missing album artwork?

    I am having to recreate my itunes library and do not understand why prior album artwork appeared in my older library but not the new library?  Is there some way to scan itunes for missing album artwork?

    do you have a strongly recommended default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or a referenced library - you have unchecked that option?
    It sounds like you have a referenced library and are now experiancing one of the very siginificant drawbacks of a referenced library and one of the many reasons they are strongly not recommended
    Also note that iPhoto '11 may use alises in the originals folder as part of the upgrade
    It is important that we understand exactly what you have and what is not sorking - what error messages you are getting
    You must NEVER make any changes of any sort to the structure of content of the iPhoto library - there are no user servicable parts in it  --  and you can not rebuild yoru librtary - only iPhoto ir iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can rebuild a library unless you are a SQL programmer and understand the structure that iPhoto uses
    LN

  • I have downloaded an update for my ipod 4th, and after that all my songs, pictures and apps have been erased, Is there some way to recover all my information without have done a security copy?

    I have downloaded an update for my ipod 4th, and after that all my songs, pictures and apps have been erased, Is there some way to recover all my information without have done a security copy?

    I supsect you did the update on other than your syncing computer. If yu did the app, music and synced photo will not be on the iPod after the update since those items are not in the backup that iTunes makes. See:
    iOS 5: Updating your device to iOS 5
    The above applies to all updates performedvia USB on a computer. To get stuff back, restore from backup on the syncing computer.
    The above in my educated guess since you provided litle information about how you did the update.
    You can redownload many iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I pre-ordered an album and i did not get it! i payed 14 some dollars for it and never received it i checked to see if i bought it and it said i did. i looked to see if i could re download the album but i dont know how please help!

    I pre-ordered an album and i did not get it! i payed 14 some dollars for it and never received it i checked to see if i bought it and it said i did. i looked to see if i could re download the album but i dont know how please help!

    If you are in a country where music can be redownloaded then it should show in the Purchased tab in the iTunes store app on your phone, and the Purchased link under Quicklinks on the right-hand side of the iTunes store homepage on your computer's iTunes. If it doesn't show there then does the Store > Check For Available Downloads menu option on your computer's iTunes find it ?

  • HT1918 I cannot access files I uploaded from an old computer.  The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address?

    I cannot access files I uploaded from an old computer. The email account to which some tracks are connected is deleted. For some reason my birth date doesn't work either. Is there some way to transfer the files to my current address and username?

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

Maybe you are looking for