By default, all the value in the selection list, so Select percent select list

Hello

I created the application process to extract the name of the State in the selection list based on the name of the city.
Now I need if I don't have the name of the city and I select % in city name select list then any name should come in the select list.
Now if I select % in select list and then he shows me empty in state name select list.

How can I extract all the name of the State if I select % in select list.

My application process
BEGIN
  OWA_UTIL.mime_header ('text/xml', FALSE);
  HTP.p ('Cache-Control: no-cache');
  HTP.p ('Pragma: no-cache');
  OWA_UTIL.http_header_close;
htp.prn('<data>');
   HTP.prn ('<select>');
   FOR c IN (select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5)
LOOP
  HTP.prn ('<option value="' || c.CODE || '">' || c.NAME || '</option>');
   END LOOP;

   HTP.prn ('</select>');
htp.prn('</data>');

END;
My city name Table

CREATE TABLE  "CITY_MAS" 
   (     "CODE" VARCHAR2(3) NOT NULL ENABLE, 
     "NAME" VARCHAR2(1000) NOT NULL ENABLE, 
     "STATE_CODE" VARCHAR2(3) NOT NULL ENABLE 
        )
My name status Table

CREATE TABLE  "STATE_MAS" 
   (     "CODE" VARCHAR2(3) NOT NULL ENABLE, 
     "NAME" VARCHAR2(50) NOT NULL ENABLE 
     )
/
How can I do that.

Thank you

Published by: 805629 on January 25, 2011 02:06

Change the cursor query loop to handle this

select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5

TO

select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND
( C.CODE =:SELECT5 OR :SELECT5 = '%' )

Tags: Database

Similar Questions

  • Getting a value from all the selected lines in the method of the AM

    Hi all

    I use JDev 11.1.1.4.0

    I have a table with the selection of several lines. In my module application I want to call a stored procedure with the parameter whose value depends on the selected line in the table.
    For the only selection I can make fallow:
        public void wypiszId() {
            ViewObject vo = findViewObject("ProcsklView1");
            String st = vo.getCurrentRow().getAttribute("IdProcskl").toString();
            System.out.println(st);
    How can I deal with multiple selection?

    Kind regards
    Wojtek.

    Hello

    VO/iterator will hold only selected line at a time. Thus, for multi table enabled selection, the last selected line would be the selected line (vo / Iterator). In order to obtain all the selected lines, you must obtain support bean by linking the Table of the ADF.

    Check out this blog on this goal.

    http://blogs.Oracle.com/aramamoo/2010/12/getting_all_selected_rows_in_adf_table_with_multiple_rows_selection_enabled.html

    Arun-

  • How to disable all the selections at once?

    How to disable all the selections at once?

    If you are referring to the playlist, artist, album & kind selection boxes, then I don't think that there is a way to uncheck those all at once.

    If you mean the boxes in the view of songs Ctrl + click and the checkbox to check or uncheck all of the boxes. Note, however, that the use of these boxes is a bad way to manage the synchronization. Uncontrolled songs are ignored in the normal course of track in track or shuffle playback. Better to use one or more playlists to control what is synchronized and have checked most, if not all of your library. Items not controlled in my library are things like interview bonus tracks that had never what to hear accidentally, I keep in my library.

    TT2

  • Is it possible to have windows to automatically select a spare printer by default when the selected default printer is off line?

    I use a laptop and move between two locations each with its own printer.  Whenever I move, I have to change the default printer by opening printers & faxes from the control panel.  Is it possible to have windows to automatically select a spare printer by default when the selected default printer is off line?

    Hi Tom,

    If the default printer is not in offline mode, it will detect the different printer but it will not be a default one.

  • Updated all the selected lines in a table.

    Hello

    Jdev Version 11.1.2.3.0

    I'm trying to update all the selected rows in a table with several choices.

            AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
            ViewObject vo = am.findViewObject("RegistrationHistory1");
            RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys();
    
    
            if (selectedRegistrations != null) {
                Iterator iter = selectedRegistrations.iterator();
                    while (iter.hasNext()) {
                        Object facesTreeRowKey = iter.next();
                        Row[] row = vo.findByKey((Key)((List)(facesTreeRowKey)).get(0), 1);
    
    
                        if (row != null && row.length == 1) {
                            Row r = row[0];
                             r.setAttribute("Attr", "1"); 
                        }
                    }
              }
    

    But after I put the attribute on the line. My iterator ignores most of the lines and they don't last updated.

    It works very well for the removal of the line well.

    Any suggestions?

    It turn out that I got a try catch and in the catch, I had a log (e.printStackTrace ()) and I do not see a single line in the diary saying ConcurrentModificationException appearing all the time.

    Looks for read-only access to an attribute or delete lines is OK to iterate over the selected lines, but it's different for the modification of an attribute.

    The code that worked:

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    Entry DCIteratorBinding = bindings.findIteratorBinding ("RegistrationHistory1Iterator");

    RowSetIterator regRSiter = regIter.getRowSetIterator ();

    RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys ();

    Object [] keys = selectedRegistrations.toArray ();

    for (Object key: keys) {}

    Line currentRow = regRSiter.getRow ((Key) ((List) key) .get (0));

    removeOrModify (currentRow);

    }

  • I can't import photos into lightroom free trial cc/6 2015. Lightroom can see all my pictures from my SDHC card and allows me to implement the import, and then clicking import it says that all the selected files (245) has not can be imported as they could

    I can't import photos into lightroom free trial cc/6 2015. Lightroom can see all my pictures from my SDHC card and allows me to select and configure the import, and then clicking import it says that all the selected files (245) has not can be imported because they could not be read. I use MacBook Pro 2015 OS X Yosemite 10.10.3, photos taken with Canon G1 X Mark II. Any ideas?

    This message indicates that you have not permission in writing to the destination directory.

    So:

    1. Determine the destination directory... go in the Lightroom import dialog box and note the location of this directory specified on the right side under "Destination".
    2. Go to your operating system and change the permissions on this exact directory have WRITE permission.
  • Get an AIArtHandle for all the selected items in the doc

    I'm doing what someone does in this other thread about the export in PNG.

    reference: http://forums.Adobe.com/thread/320685

    We have several layers (some off and locked).

    I would like to pass all the selected items to the Action of Image Optimization as a group rather than optimize each.  I use AIMatchingArt Suite to retrieve items selected, but it points to an array of AIArtHandles... any ideas?

    That's how I ended up doing and it works.  (In addition to the other code which has been referenced in the original post).

    I don't know if it would work better with an ArtSet, but it works.  Perhaps, if the images I'm flattening were somewhat more complicated, I would run in the duplication you mentioned.

    result = sAIActionManager-> PlayActionEvent (kAISelectAllAction, kDialogOff, NULL);

    result = sAIMatchingArt-> GetSelectedArt (store, & County);

    If {(result)

    Store = NULL;

    Count = 0;

    } else {}

    result = sAILayer-> InsertLayer (NULL, kPlaceAboveAll, & newLayer);

    If (newLayer &! result)

    {

    sAILayer-> SetLayerVisible (newLayer, true); See the layer

    sAILayer-> SetLayerIsTemplate (newLayer, false); Mark as NOT a model layer get exported

    sAILayer-> SetLayerEditable (newLayer, true);

    result = sAIArt-> NewArt (kGroupArt, kPlaceAboveAll, Nile, &group);)

    for (index = 0; (result == kNoErr) & (index< count="" );="" index++="" )="">

    Art AIArtHandle = (* store) [index];

    Copy of AIArtHandle;

    Add the art group

    result = sAIArt-> DuplicateArt (kPlaceInsideOnBottom, group, ©);)

    }

    }

    }

  • Custom code to return all the selected items in a dynamic list

    Does anyone know of a custom code to return all the selected items in a dynamic list? Support told me that Dreamweaver does not return the last item. If anyone can give me a Tips how make this code custom or can direct me to code, I would be eternally grateful.

    Thanks to you two. I used the square brackets since they are in this season...

    No,

  • What burning CDs in Windows Media music system prepares all the files listed.

    What burning CDs in Windows Media music system prepares all the files listed.  When the system starts writing the files on the disc it gets through about 4 songs and then goes to finalize the disc and ejects the disc.  The disk does not appear to have anything on it.  Can I do anything locally to solve the problem?

    My system is XP.

    I burned the disc a lot in the past

    There has been no major changes to the system

    The files I am to burn to the disc are previously ripped files on the disk hard, some of them were burned on another drive before.

    I tried to slow down the burn speed, but that did not work.

    CD burning problem

    Hello

    • You receive an error message when burning CDs?
    • What were the changes made before the issue started?
    To resolve this problem, do one or more of the following and then try again:

    a. Verify that the CD burner is properly connected.

    b. clean the disc and verify that it is not damaged.

    c. try a different brand of blank discs.

    d. If another program is currently burning files on the CD, wait until the burning process is completed.

    e. Quit other programs that may be using the CD burner.

    f. restart Windows Media Player.

    g. restart your computer.

    h. use the Windows error-checking tool to find system errors of files with bad sectors on your hard drive. For more information about the error-checking tool, see Windows Help and Support.

    You can check: http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&mpver=11.0.5721.5145&id=C00D10DA&contextid=30&originalid=C00D0019

  • I get a message saying "you have exceeded your profile storage space. Yet all the files listed th are actually my docs and application data. How to delete my profile, but not from my pc? increase the max profile size

    I get a message saying "you have exceeded your profile storage space. Yet all the files listed th are actually my docs and application data. How to delete my profile, but not from my pc? increase the max profile size

    1. the first thing to do is to make sure that the computer is completely virus/malware-free. Googling around this error produced quite a few links where the posters were or had been infected with Spyware Protect 2009 rogue.

    http://www.elephantboycomputers.com/page2.html#Removing_Malware

    Once the scanning is complete (do not skip the preparatory stages no more), if the problem persists:

    2. double-click on my computer, right-click the icon for your hard drive, click left to get its properties. If you see options to set Quota management make sure that they are disabled.

    3. in the case - BUT ONLY AFTER YOU ARE sure THAT THE MACHINE IS MALWARE/VIRUS-FREE - copy the lines between asterisks (not including the asterisks) below and paste it into Notepad. Save as undopolicy.reg somewhere, you will find. And then double-click the .reg file, that you have just made to melt in your registry. I hope that this will take care of the issue.

    *****
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
    'EnableProfileQuota ' = -.
    'ProfileQuotaMessage ' = -.
    "MaxProfileSize" = -.
    'IncludeRegInProQuota ' = -.
    'WarnUser ' = -.
    'WarnUserTimeout ' = -.
    *****

    MS - MVP - Elephant Boy computers - don't panic!

  • Desktop screen will not scroll all the selected images

    Using customization / Desktop / background, I have a directory selected with more than 30 photos in there. I select all to move every 30 minutes for my 2 monitor that I use on Windows 7.  But it is inevitable he will stick on a photo and stop every 30 minutes until what I left in a reselect all the photos of cycling. What happened since I installed Windows 7.  Ideas on that. Very annoying to say the least!

    Hello Chris,

    Thanks for the reply.

    Before starting with the next steps in troubleshooting, I would like to know if you have any third-party program/software installed on the computer desktop customization?

    As the steps to rename the TranscodedWallpaper.jpg has not helped, you can try the troubleshooting steps below and check if they help you solve the issue.

    Check the background setting in Power Options

    • Click Start, type Power Options in the Start Search box, and then click Power Options in the list.
    • In the Select a power plan window, click change plan settings next to your selected power plan.
    • Click change advanced power settings, and then expand the desktop background settings option.
    • Expand the slide show, and then make sure that the option of sector is set to available.
    • Click OK, and then close the window changes to the plan .

    Check the context parameter to delete in the accessibility settings

    • Click Start, Control Panel, accessibility, and then click accessibility.
    • Under explore all parameters, click on the make the computer easier to see.
    • Make sure that the option to remove background images not selected not.
    • Click OK twice, and then close the accessibility window.

    Let us know the results of the troubleshooting steps, so that we can help you further.

  • Not applied to all the selected images metadata changes

    I have 2 problems.

    When I'm in the lightroom library (3.5), I want to change the time of the capture of several photos, apply keywords.

    However, when I perform one of these actions, the changes are only applied to the image displayed in the image "brighter highlighted", not all that are selected.

    Is there a setting I'm missing?  I can't understand why it does not work.

    Also, I aplogize if my search skills are weak, and this has been covered already.  I tried to see if this question has been answered before posting.

    Thank you.

    You must be using grid to apply metadata to all of the selected images, otherwise LR only apply it to the image displayed in the main area. You can also on AutoSync swith in the library.

    Also, I aplogize if my search skills are weak, and this has been covered already.  I tried to see if this question has been answered before posting.

    I don't think it's your skills that are weak, but the search function of this forum...

    Beat

  • What is all the information listed in the send/receive emails about how it is received and how you delete

    When I send or receive an e-mail message date, to, from and subject line are fine, but after that, all this encrypted information that is listed there. I don't know what they call this information, how this information began to appear, I don't want to be here, and I do not want to print every time I have to print an email. It takes an entire page and it is longer than the email real I am receiving or sending?

    How can I get rid of him! Thank you very much!! Lisa

    The menu bar, select View-Headers-Normal

    No menu bar? Press the ALT key.

  • I get all the programs listed under my program menu on the start menu, but they all show empty and all my programs are in c/programs as it should.

    My computer was infested with viruses, Trojans and so had all digitized and clean, but all my programs listed in the start menu there are the EMPTY list.

    I have downloaded and run the Microsoft Fixer ( http://support.microsoft.com/kb/886549 ) and everything is the same.

    Any help will be much appreciated.

    Thank you!

    Jorge.

    Hi DandyBaron,

    ·         You are not able to access these programs at all, or simply not start menu?

    Follow these methods in the order and see if the problem is resolved.

    Method 1: Follow the steps and check out them.

    a. open an Admin command prompt window. To open an administrator (high) prompt, click Start, click programs, accessories principally made, right click Guest and then click Run as administrator.

    b. in the command prompt window, type the following command and press ENTER:

    regsvr32 msxml3.dll

    c. closing session and you connect again to your user account and see if the menu items are displaying correctly.

    Method 2:

    Step 1:

    I suggest you analyze your computer Microsoft Safety Scanner, it will help us to get rid of viruses, spyware and other malware

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Step 2: try the SFC (System File Checker) scan on the computer.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

    Hope this information helps.

  • How can I removed all the contacts list?

    Hello, all.

    I want to removed the entire list of contacts from my blackBerry with blackberry API.

    I wrote this...

    ---------------------------------------------------------------------

    try {}

    List of strings [] = PIM.getInstance () .listPIMLists (PIM. CONTACT_LIST);

    BlackBerryContactList bbList = (BlackBerryContactList) PIM
    .getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_ONLY, list [0]);

    Enumeration enm = bbList.items ();

    While (enm.hasMoreElements ()) {}
    Contact = enm.nextElement ((Contact));

    bbList.removeContact (contact.);

    }

    } catch (Exception e) {}

    e.printStackTrace ();

    }

    ---------------------------------------------------------------------

    But there "No trace of the stack" exception.

    So, what do you think, forge, can you help me with this problem.

    Thank you.

    Thanks to you all.

    I solved this problem.

    Here it is...

    ---------------------------------------------------------------------

    try {}

    BlackBerryContactList bbList = (BlackBerryContactList) PIM
    .getInstance () .openPIMList (PIM. CONTACT_LIST, PIM. READ_WRITE);

    Enumeration enm = bbList.items ();

    While (enm.hasMoreElements ()) {}
    Contact = enm.nextElement ((Contact));

    bbList.removeContact (contact.);

    }

    } catch (Exception e) {}

    e.printStackTrace ();

    }

    ---------------------------------------------------------------------

    I changed "PIM. AndI READ_WRITE"need not"[] list.

Maybe you are looking for