Command Similar to "IN LIKE"

select * from emp
where deptno in like ('10%','20%')
i need similar command to perform the above sql.
i cannot give or comman as no of departments inside the in like clause is dynamic..
Pls Help
Thanks
Vinoth
Edited by: suzvino on Dec 26, 2011 2:40 PM

May i know i how it will help in my case...Yes you may
just to play with something like (assuming deptno is varchar2 type as in your original post, if not, you just do to_number(substr(...)) as token and you're done
:txt should contain your department list as '10,20' or '10,30,50' ...
select *
  from emp
where deptno in (select substr(txt,
                                instr(txt,',',1,level) + 1,
                                instr(txt,',',1,level + 1) - instr(txt,',',1,level) - 1
                               ) as token
                    from (select ',' || :txt || ',' txt
                            from dual
                  connect by level <= length(:txt) - length(replace(:txt,',','')) + 1
                 )having an inline query providing the deptno list
with
inline_query as
(select listagg(to_char(deptno),',') within group (order by deptno) dept_list
   from departments
  where rownum <= :number_of_depts
select *
  from emp
where deptno in (select substr(txt,
                                instr(txt,',',1,level) + 1,
                                instr(txt,',',1,level + 1) - instr(txt,',',1,level) - 1
                               ) as token
                    from (select ',' || dept_list || ',' txt
                            from inline_query
                  connect by level <= length(dept_list) - length(replace(dept_list,',','')) + 1
                 )Regards
Etbin

Similar Messages

  • Command similar to protect..endprotect in abap

    Hi All
            Is there any command similar to protect endprotect in abap list output so that salutation doesn't fragment over next page.
    or any other logic that one can use for same?
    For e.g.,
    THANKING YOU
    FOR XYZ COMPANY LTD,
    AUTHORIZED SIGNATORY.
    Regards
    Babita

    hi babita , try to use Reserve Key word for tht .
    Here is the standard help on tht  -
    Basic form
    RESERVE n LINES.
    Effect
    If there is not enough space left on the current page for at least n lines, this statement starts a new page. n can be a constant (1,2,3,...) or a variable.
    Notes
    Before starting a new page, the END-OF-PAGE processing is executed. This differs from NEW-PAGE.
    If the RESERVE statement does not trigger a new page, output is continued on the current page.
    Use BACK to return to the first line output after RESERVE.
    Note
    Performance:
    The runtime required to execute a RESERVE statement is approx. 1 msn (standardized microseconds).
    hope this will help.
    amit

  • Does MAC OS have a "route add" command similar to a DOS command?

    Does MAC OS have a "route add" command similar to a DOS command?
    I know that with DOS, you can type "route add 192.168.x.x MASK 255.255.x.x 192.168.x.x" to add a route on your PC,but does MAS OS X(10.4.9) have something similar to it? I have a network printer that my winXP can access but my MAC cannot. I was unable to ping it from both wINXP and MAC. But after I added the route to my winXP I was able to ping and print to it. I do not know if I can do the same to my MAC. Does anyone know what the command is?
    Thank you in advance.

    Yes, and Welcome! ...
    http://www.osxfaq.com/man/8/route.ws
    And to make it permanent...
    http://www.osxfaq.com/tips/kluskens/index.ws

  • Is thier a command for looping. somthing like sym.loop("") or EC.Sound.loop(""). I mainly need this

    is thier a command for looping. somthing like sym.loop("") or EC.Sound.loop(""). I mainly need this for two work for looping a sound file.
    Thanks.

    Hey, sabermaster-
    Not at the moment, though you can create your own loop effects by using triggers on the timeline.  What specific functionality are you looking for?
    -Elaine

  • Is there Exchange 2013 view Exchange Management Shell command similar to Exchange 2010

    Hi,
    Is there anything similar in Exchange 2013 (Please refer the image).  In Exchange 2010 if you make any changes via Management console you could go to "View Exchange Management Shell Command Log" and see what shell command it ran in the background.
     It was very handy to copy shell command from here and then run it from shell in case you need to make bulk changes rather than try to find out the shell command from scratch.
    I was wondering if there is anything similar in Exchange 2013.
    Thanks,
    Raman

    Probably in SP1...
    Keep your finger cross ;)
    Cheers,
    Gulab Prasad
    Technology Consultant
    Blog:
    http://www.exchangeranger.com    Twitter:
      LinkedIn:
       Check out CodeTwo’s tools for Exchange admins
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • What IOS command similar to catos command 'set port vtp X disable'

    Hi,
    Does anyone know if a similar command of catos command 'set port vtp X disable' exists in native IOS (12.1E or 12.2SX) on cat6500?
    We still can play in native IOS with VTP pruning, transparent mode but it seems that we can no more disable VTP on a particular port/interface.
    Many thanks.
    Regards/Ludovic.

    While one may not be able to disable VTP directly, I would think you could use a MAC ACL against the VTP MAC address of 01-00-0C-CC-CC-CC. (See http://www.cisco.com/en/US/partner/tech/tk389/tk689/technologies_tech_note09186a0080094c52.shtml for details on how that addressing works.)
    See http://www.cisco.com/en/US/partner/products/hw/switches/ps708/products_configuration_guide_chapter09186a00801679f8.html#wp1359352 for details on the command syntax.
    Hope this helps. Please rate helpful posts.

  • CSM command similar to CSS sticky-srcip-dstport

    Is there a command in the CSM similar to the CSS command sticky-srcip-dstport?
    If thre isn't...is there still a way to do something similar on the CSM?

    CSM sticky functionality with multiple SSL connections with resumption.
    http://www.cisco.com/en/US/products/hw/modules/ps2706/products_configuration_example09186a0080216c16.shtml

  • Command similar to data fill in Excel?

    Is there a command that is similar to the data fill command in Excel? I am looking to have a way to increment a column by week and another to decrement each cell by one. And while I am on this subject, has anyone seen a cheat sheet for the most common Excel commands to iWork '08 for say Pages and Numbers?

    Ancient_One wrote:
    Is there a command that is similar to the data fill command in Excel? I am looking to have a way to increment a column by week and another to decrement each cell by one.
    look at pages 66 and 91 in the PDF User Guide.
    And while I am on this subject, has anyone seen a cheat sheet for the most common Excel commands to iWork '08 for say Pages and Numbers?
    Apple deliver three well done PDF User Guide describing the way to use the progs and giving a list of every available FUNCTION().
    Yvan KOENIG (from FRANCE jeudi 29 mai 2008 18:29:17)

  • What is the command similar to ied (HPUX) on Solaris

    I was using ied (interactive editor) to store previous commands on HPUX. Is there a similar utility on Solaris?
    Rgds
    Haraprasad

    Hi Haraprasad,
    If you use ksh on Solaris and use option -o vi ($ksh -o vi), this will provide you the similar functionality. You can recall or search the previous command using key sequence "ESC k" or "ESC /<command>".
    Hope this helps.
    Thanks,
    --Raj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Using TCP Send Commands similar to Hyperterminal

    Hey everyone,
    I am making my first program that deals with wireless communication. I am having some issues in understanding how data is transmitted.
    Here's what I am currently able to do. I can open hyperterminal, directly connect to my device using the IP Address and Port number. Once connected, I see my 'Hello' confirming that I am connected. After being connected, I can send out characters one by one using Hyperterminal. This is perfectly ok for testing, but I want to use LV to make a GUI so that I won't mix up what button commands what.
    I have attached my VI and I feel like I'm doing something fundamentally wrong. When using Telnet, if I send a '1' I can see its value on the Rx port of my device using an oscilloscope. With my VI, I don't see anything from the oscilloscope until I stop it.
    I think I am just missing something small. I really appreciate the help.
    Thanks,
    Seth
    Attachments:
    TCP Basic Read.vi ‏16 KB

    Thank you for the quick feedback.
    Here are the edits that I made. I am now seeing data from the oscilloscope, but it's not what I'm expecting. With how my code is set up, would it send whatever command is in the box every 50ms? Is the delay even necessary? I am really just trying to learn how to send a single character. Once I'm able to do that, I can take it from there.
    Again, I really appreciate the help!
    Attachments:
    TCP Basic Read1.1.vi ‏14 KB

  • How does Numbers Transpose command (similar to Excel's TRANSPOSE command) work?

    The Excel transpose can be used to convert a row of cell into a column of cells. Or vise versa. In excel there is the critical difference where you identify an Array by tpying Control+U then Command+Return. This provides the stepping through the cells when you copy the formular down (for column) or across (for row).
    I can't figure how to do it without this (very opaque) Array facility which Excel has. Openning my Excel demo file results in an error and I get pasted values from last calculation, so Numbers obviously doesn't have feature compatibility with Excel here.
    I actually just want the pasted values, so even a menu command that cuts a row of cells and pastes those cells into a column (or vise versa) would be fine, don't need a permanent formula to do it.
    Bananas
    Oranges
    Mangoes
    Apples
    Pears
    Peaches
    Nectarines
    Silver beet
    Dates
    Bananas
    Bananas
    Oranges
    Oranges
    Mangoes
    Mangoes
    Apples
    Apples
    Pears
    Pears
    Peaches
    Peaches
    Nectarines
    Nectarines
    Silver beet
    Silver beet
    Dates
    Dates

    I'd use OFFSET for this purpose. Works in either direction.
    Original is a data table (all values entered directly)
    Transposed contains a single Formula, entered in A1, then filled down* to row 4, and filled right to column D.
    Transposed::A1:   =OFFSET(Original :: $A$1,COLUMN()-1,ROW()-1)
    *Because Row 1 is a Header row, it's not possible to Fill down into the 'regular' rows below. You can do the Fill down and Fill right on a Plain table (no header rows or columns), then convert the top row and left columns to Header versions, or you can click on A1 to select it, Copy, then click on A2 and Paste. Fill down the rest of column A, then select the full column and fill right to column C.
    Here'a a second example, used to convert a column oriented data entry table to table with data oriented in the one row = one record convention.
    Same basic formula here. The IF(ISBLANK part is added to avoid zeros in cells corresponding to empty cells in the entry column.
    =IF(ISBLANK(OFFSET(Aux::$A$1,COLUMN()-1,0)),"",OFFSET(Aux::$A$1,COLUMN()-1,0))
    Regards,
    Barry

  • Edge Animate/javscript API command similar to Actionscript fscommand('quit')?

    Our company recently replaced Flash with Edge Animate due to some major memory leak issues when pulling in dynamic data for our digital signage.
    In Actionscript, it was easy to signal to the digital signage player that the movie was ending with a custom fscommand.
    However, in HTML5, im having issues with how to do this in javascript. I currently do not see anything in the JSAPI for Edge Animate that would allow me to signal a third party player to end and unload the animation that is playing.
    I need to do this because the length of the animation is based on how much XML data I parse. This amount of data can change daily (10 seconds per xml node).
    Has anyone has a similar issue with this in the past and found a solution?
    Or perhaps I'm doing this incorrectly and I should be dynamically be creating the animation based on the available nodes in the timeline.
    Any feedback would be appreciated.

    Hi ,
    We have a timeline complete event in Edge Animate which would signal the completion of the animation. You can add your code for the timeline complete and then perform the appropriate action here.
    Thanks and Regards,
    Sudeshna Sarkar

  • Need to know how to check text accuracy for CN language PDF's? I knew for EN and EU language, similarly i would like to know for Chinese language books in PDF compare process.

    Hi.
    This is for Ebook conversion purpose, Currently am doing the text accuracy for English(EN) and Latin(EU) books using Acrobat 11 Pro application with Source and Converted PDF(final output of epub/mobi).
    Similarly am trying to find the text accuracy for Chinese language books using PDF compare process, When i attempt, could see the compare report in PDF format for CN books, but i cannot catch the any text errors in it. Please advise and help me out whether i need to go for different version of acrobat or do i need to add any plug-ins with respect to language or chinese fonts here.

    Could any one please advise me on my question, so that it will be helpful to purchase the correct application before i go forward.

  • How to send commands to command button to look like an event

    Hi all
    I am trying to find the proper way to send a software command to a command button.
    For example say you have a simple (OK) command button, within that command button the callback function has multiple lines of code that are run from within that one callback.
    Now what I want to do is call the (OK) button in another function as if the user pushed the button without effectively having the function to wait for all the process in the (OK) callback to finish, I want it to call the (OK) button and get out of its function and continue on.
    What I have seems to work but I am not sure if this is the proper way of coding it.
    Code sample to turn on =1and off 0:    OK Callback (panelnumber =2, controlnumber = 2, event=2 , callback= NULL, event1=0, event2=0)
    if(ON)
    SetCtrlVal(panelmain, PANELMAIN_OK,ON)
    OK(2,2,2,NULL,0,0);
    else
    SetCtrlVal(panelmain, PANELMAIN_OK,OFF)
    OK(2,2,2,NULL,0,0);

    You can call the callback function as any other function, see e.g. here

  • Commands similar to 'on change of'

    Hi experts,
    kindly tell me about commands doing the same function as 'on change of'.
    Thanks
    -Pranati

    You can use AT NEW.. Check this example...
    Example
    TYPES: BEGIN OF COMPANIES_TYPE,
            NAME(30),
            PRODUCT(20),
            SALES TYPE I,
          END   OF COMPANIES_TYPE.
    DATA: COMPANIES TYPE STANDARD TABLE OF COMPANIES_TYPE WITH
                         NON-UNIQUE DEFAULT KEY INITIAL SIZE 20,
          WA_COMPANIES TYPE COMPANIES_TYPE.
    LOOP AT COMPANIES INTO WA_COMPANIES.
      AT NEW NAME.
        NEW-PAGE.
        WRITE / WA_COMPANIES-NAME.
      ENDAT.
      WRITE: / WA_COMPANIES-PRODUCT, WA_COMPANIES-SALES.
      AT END OF NAME.
        SUM.
        WRITE: / WA_COMPANIES-NAME, WA_COMPANIES-SALES.
      ENDAT.
    ENDLOOP.
    Thanks,
    Santosh

Maybe you are looking for

  • Old computer dead, How can I sync my iPhone contents into new computer

    Hi Pro, My old computer dead. But my iPhone was synced with it. when I try to sync it with my new computer, it always ask me to allow it erease my iPhone contains. But that is the the only thing I left. all musics, Voice memos etc. are in iPhone. The

  • Why poor quality when I export in HD?

    I've shot some video on a Panaonic HDC-HS9, imported in original quality, edited it up, and want to export it in HD quality, for later use on DVD and YouTube HD. When I export it using the standard setting HD 1080x720 (in the export movie... option),

  • Refurbished or not

    How can I learn if my Ipad is refurbished or not

  • 'Runtime Operation Error' on BPM/Workspace

    Hi all, When I'm logging into the BPM 11 G Work space I'm getting a error indicating *" Runtime Operation Error''* . This error occurs only for my login. Other users not getting this and their logins are working properly... What can be the issue? Tha

  • Flash keeps crashing and now its saying data execution prevention has closed adobe flash player

    Flash has always given me alot of problems. adobe flash would ocassionaly crash through out the day. i usual refresh the page and its all good for a little while. but now its closing/crashing on every single page im going to. its also saying 'to help