How to use the multivalued parameter in which the condition

Hi guys;

for sure, the use of v_USR_NAMES parameter is BAD! because it will not be monitored as a collection of values.

Please provide me a way how to let run in the right way.

declare
  v_USR_NAMES varchar2(1000) := 'SYS,SYSTEM,SH';
begin
  -- sure the following loop is wrong, how could I correct it
  for user_cur in (select * from dba_users where username not in v_USR_NAMES) loop  
   --Do it
  end loop;

end;

/

Best regards, Dia

DECLARE
   v_usr_names   VARCHAR2 (1000) := 'SYS,SYSTEM,SH,SYSMAN';
   l_cnt number;
BEGIN

l_cnt := length(v_usr_names) - length(replace(v_usr_names,',')) + 1 ;

   FOR user_cur IN
      (SELECT *
         FROM all_users
        WHERE username NOT IN (
                 SELECT     REGEXP_SUBSTR (v_usr_names, '[^,]+', 1,
                                           LEVEL) str
                       FROM dual
                 CONNECT BY LEVEL <=l_cnt))
   LOOP
      DBMS_OUTPUT.put_line (user_cur.username);
   END LOOP;
END;

Tags: Database

Similar Questions

  • How to use the conditional and made mandatory

    Hello

    I need to use the conditional and made mandatory something jspx page. Following line gives an error:

    rendered = "#{Bindings.type.inputValue! = 'abc' & & bindings.proofId.inputValue! ="} ' "

    Error: Name expected instead of &.

    What is the right way?



    Note: I use Jdev 10.1.3

    Boring, but you can use & #38; & #38; (remove the space after the &) for this.

    Timo

    Published by: Timo Hahn on 24.11.2009 08:46

    Published by: Timo Hahn on 24.11.2009 08:48

  • How to use the conditions where there are more than two options

    I have a blade that collects information from the user and then makes decisions based on the values entered. On a slide I use the widget drop-down list and list of"basic", "Intermediate" and "Advanced". I hoped to do is use the Coditional Structure as follows:

    1. If the Basic was selected slide goto BasicQuickQuiz
    2. If the intermediary has been selected goto slide IntermediateQuickQuiz
    3. If Advanced was selected slide goto AdvancedQuick Quiz

    I can make this work for Basic or intermediate, but I don't see how (or even if) I have a multi level if statement.
    My work is about:
    1. a button added logic:
    So basic, then got otherwise BasicQuickQuiz goto IntermediateQuickQuiz

    2. on the Enter slide on IntermediateQuickQuiz event:
    If the intermediary, then keep, otherwise goto slide AdvancedQuick Quiz

    It works, but it seems awkward - y at - it another way that this goal could be achieved?

    Tim

    What I was hoping to see was the ability to create several Else If statements within the only condition. I've changed it now to add two conditional statements, one after the other, but still find this unscrupulous feature.
    I will record a feature request to add a Select Case block / Switch style fuction to this group.
    However, since it is new I can live with the workflow (for this version of Cp anyway!)

    Tim

  • How to use the parameter B-BIS in a factory of connections

    How to use the parameter B-BIS in a factory of connections (OS 5.0)?

    I have found no no API for it.

    Maybe http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/io/transport/options/BisBOptio... ?

  • Is there an online class to learn exactly how to use the command prompt which is quite through. OR y at - it clear a book that explains in detail for this? Who should I contact?

    I would like to know how to use the command prompt.  The nethodology type in the cmd prompt with the syntax and the Liposuction, in other words, the real return to a command prompt. I downloaded about evertthing I can find about this, but can't seem to put it all.

    My OS is Windows XP Pro sp3, lots of RAM, my address is * address email is removed from the privacy *.   I would like to take a rough online study if one is available if it is not too expensive.

    It really depends on what you mean by "to a command prompt."

    If you open a command prompt window (for example, in start > run > cmd > OK), you can enter a number of orders.  The list of available commands, including their syntax, is here--> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

    You can also follow the links here:http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx

    If you want to get more sophisticated - automating command-line tasks - you can start here: http://technet.microsoft.com/en-us/scriptcenter/default.aspx

  • How to use the Date range parameter.

    Dear all,

    In the human resources Module, I developed a leave leave of synthesis report that gathers data from employees on.

    The end user will pass the parameter of date_start and date_end.

    The question is, if an employee only e-123 takes leave of 22 July 2013 to August 10, 2013

    and the user passes the parameter for the month of July date_start = 1 July 2013 "and date_end = July 31, 2013" for the sub condition

    "AND TRUNC (Pab.DATE_START) > =: Date_START - July 1, 2013.

    "AND TRUNC (Pab.DATE_END) < =: Date_END - July 31, 2013.

    Emp E-123 appears in the report.

    But if the user passes the parameter of the month August 1 August 2013 ", 31 August 2013", EMP - 123 does not...

    Please suggest how to write the condition he can for all conditions.

    Kind regards

    Afzal.

    Hello

    OR condition is to be enclosed with parentheses.

    If place you within the parenthesis, then take no time to deal with.

  • How to use the date with the report parameter format

    Hi all

    How to use the date format with this tag function,

    <? param@begin:P_FROM_DATE? > <? $P_FROM_DATE? >

    This date of form source of report and setting is coming as this 2012/11/01 00:00:00.

    So now I need this in MY-DD-YYYY marker. I tried like this..? param@begin:P_FROM_DATE? > <? $format - date: P_FROM_DATE; ' DD-MON-YYYY '? >

    but its giving error. Can someone pls how to convert to the format of date custom.

    Thanks and greetings
    Srikkanth.M

    Problem solved.

    REF this link

    Date Format of XML

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • I'm not clear how to use the recovery CD

    I added all the space using my HDD is it comes about 12 GB, I have 27.9 GB of disk space, but my drive has only 1.80 left disk space. I made clear to solve this problem. Basket is empty, I ran disk cleanup.

    A computer expert suggested that Windows might have become confused and cannot recognize what place I save, it might be because I ran a program called Cyberscrub often. His solution is to reload Windows XP home. My laptop came with recovery discs, everything else is already loaded. I have so much I don't want to lose on my laptop. If I use the recovery discs, I will lose everything on my computer, am I better off buying Windows XP home and re-load, in which case I will not lose my job?

    Also I am not clear how to use the recovery discs, I can't find instructions on what you are doing.
    The only person who could help me went to travel and not reachable.
    Any help greatly appreciated
    Lorraine Hart

    It of a very simple to recover the laptop.
    Just boot from the recovery CD and follow the instructions on-screen ;)

    I put t know what version recovery CD you have, but the older one provides the standard and expert mode. In expert mode, you can choose you partition where the OS is to be installed.
    So in this case only the selected partition will be formatted!

    But have you checked the size of the HARD disk in disk management?
    Simply click on the my icon my computer and choose manage.

    Of course, you could remove the internal HARD disk and it could connect to the external USB HDD controller. Then, connect the drive HARD to the second PC and you record data on another HARD drive.

  • I just installed an SSD on my imac 24 inch 2007 but at the start of the computer does not see the drive. How to use the terminal to look for? Thank you

    I just installed an SSD on my imac 24 inch 2007 but at the start of the computer does not see the drive. How to use the terminal to look for? Thank you

    Can she be seen by disk utility (and which version of Mac OS X is)

  • How to use the greenscreen on Imovie 10.1 effect?

    I have no idea how to activate Advanced tools for this version of iMovie, there is nothing in the preferences, how I use the greenscreen / any other adnaced tool such as the image within an image etc.

    I'm on OS X YOSEMITE 10.10.5

    Hello!

    I have finally (!) has found a way to do it!

    You must drag and drop the element above the other, not ON it (like I usually did before). Then the invisible square symbol in the setting bar appears, which allows to choose between the van greenscreen etc.

  • How to: use the HP Test Fax Service

    Did you know that HP has a test fax service in which you can test sending and receiving a fax. This is particularly useful if you have a problem sending or receiving. Alternatively, you can isolate the issue is on your end or the other end. If you can successfully send a fax and receive an everything using the Test Service of fax HP, this means that your fax is working properly. If you're still sending or receiving from other chances to fax numbers that the problem is on their end.

    How to use the Fax Service to Test HP - HP Officejet Pro 8500 first All-- One A909n Printer in

    How to use the HP Test Fax Service

    I hope this helps someone. If anyone has any questions about the service or fax problems, I'd be more than happy to help.

  • How to use the automatic configuration wizard and where can I FIND?

    How to use the automatic configuration wizard and where can I FIND?

    Hi TannySmedt,

    To activate the Configuration service automatic wireless so it starts automatically, click the Start button. Select settings , then select Control Panel. If you use Windows XP display, select the performance and Maintenance category, and then select Administrative Tools. If you use Classic view, and then select Administrative Tools. In the left pane, click the Services icon. Click the automatic Wireless Configuration icon in the right pane, and change the box Startup Type to Automatic. This parameter will be defined the service starts automatically at boot time. Then click on the Start button to start the automatic Wireless Configuration service zero wireless and click on the OK button.

    The automatic Wireless Configuration can also be started and stopped from a command prompt. To start the automatic Wireless Configuration, run the following command:

    net start wzcsvc

    To stop the automatic Wireless Configuration, run the following command:

    net stop wzcsvc

  • How to use the Microsoft Narrator in Windows Vista

    I would use this feature - just do not know how. Can anyone lead me in the right direction?  Any help is appreciated?

    Hello

    Windows comes with a screen reader called Narrator, which reads text on the screen aloud and describes some events (such as displaying an error message) that happen while you're using the computer.

    You can see the following article on how to use the narrator in Windows Vista.

    Hear text read aloud with Narrator

    http://Windows.Microsoft.com/en-us/Windows-Vista/hear-text-read-aloud-with-Narrator

    I hope this helps.

  • How to use the upgrade of official ICS on ideapad K1?

    How to use the upgrade of official ICS on ideapad K1?

    Since the post of 'k1_ics_source_code.tar.gz' Open Source Code - IdeaPad Tablet K1 on the official web site

    I want to improve my K1 to ICS Android

    You can see this article on installing the update for the CSI agent: http://forums.lenovo.com/t5/IdeaPad-Slate-Tablets-Knowledge/Ice-Cream-Sandwich-Android-4-Vanilla/ta-...

    There are several different ICS ROMs available. You can watch this article to choose another: http://forums.lenovo.com/t5/IdeaPad-Slate-Tablets-Knowledge/IdeaPad-K1-Which-ROM-do-I-choose/ta-p/86...

  • How to use the device as a simulator.

    Hi all

    Can someone tell me how to use the device (with my development pc) as Simulator.

    Whenever I need to check the appilcation in device of signed files .cod that is compiled in the Simulator.

    Because I got the outofmemory error in the device rather than simulator.

       

    Thus, any solution which signed without how can I check my direct request to the device itself. Any setting in preferences or etc...

    Thank you

    Tejas

            

    The only way you should not sign the cod is if no controlled classes/interfaces are used. The easy way to find out is to open the SignatureTool and see if your application requires signature. Otherwise this says icefrost1 's good enough solution.

Maybe you are looking for