Generate a kind of Cartesian list

I have a simple list that I have to combine that himself.

INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.197');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.198');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.199');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.202');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.203');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.204');
INSERT INTO MY_TAB ( ID ) VALUES ('10.253.14.205');

Now I wan to generate a combination of each IP address.

But what I get is the following:

 SELECT
  S1.ID as A,
  S2.ID as B
  FROM MY_TAB S1
  CROSS JOIN MY_TAB S2
  WHERE S1.ID != S2.ID

Data:

10.253.14.197 10.253.14.198

10.253.14.197 10.253.14.199

10.253.14.197 10.253.14.202

10.253.14.197 10.253.14.203

10.253.14.197 10.253.14.204

10.253.14.197 10.253.14.205

10.253.14.198 10.253.14.197

10.253.14.198 10.253.14.199

10.253.14.198 10.253.14.202

10.253.14.198 10.253.14.203

10.253.14.198 10.253.14.204

10.253.14.198 10.253.14.205

10.253.14.199 10.253.14.197

10.253.14.199 10.253.14.198

10.253.14.199 10.253.14.202

10.253.14.199 10.253.14.203

10.253.14.199 10.253.14.204

10.253.14.199 10.253.14.205

10.253.14.202 10.253.14.197

10.253.14.202 10.253.14.198

10.253.14.202 10.253.14.199

10.253.14.202 10.253.14.203

10.253.14.202 10.253.14.204

10.253.14.202 10.253.14.205

10.253.14.203 10.253.14.197

10.253.14.203 10.253.14.198

10.253.14.203 10.253.14.199

10.253.14.203 10.253.14.202

10.253.14.203 10.253.14.204

10.253.14.203 10.253.14.205

10.253.14.204 10.253.14.197

10.253.14.204 10.253.14.198

10.253.14.204 10.253.14.199

10.253.14.204 10.253.14.202

10.253.14.204 10.253.14.203

10.253.14.204 10.253.14.205

10.253.14.205 10.253.14.197

10.253.14.205 10.253.14.198

10.253.14.205 10.253.14.199

10.253.14.205 10.253.14.202

10.253.14.205 10.253.14.203

10.253.14.205 10.253.14.204

You are looking for an IP ending with 197 I want:

10.253.14.197 10.253.14.198

10.253.14.197 10.253.14.199

10.253.14.197 10.253.14.202

10.253.14.197 10.253.14.203

10.253.14.197 10.253.14.204

10.253.14.197 10.253.14.205

I don't want the reverse combination:

10.253.14.198 10.253.14.197

10.253.14.199 10.253.14.197

.. and so on

Hope for help.

Best regards


Tobias

But what I get is the following:

  1. SELECT
  2. S1.ID has,
  3. S2.ID b
  4. OF MY_TAB S1
  5. CROSS JOIN MY_TAB S2
  6. WHERE S1.ID! = S2.ID

Hello

Try s1.id<>

Concerning

Marcus

Tags: Database

Similar Questions

  • How to generate the display of mobile list with data of the user

    I try to develop a simple mobile application (mobile jquery) in Dreamweaver.

    I want to create a list of names of people from entering information via a form.

    The list would then be based on criteria that is last name or Department

    This require additional database programming or it is part of jquery mobile?

    I know it sounds simple, but I'm not a programmer, so I'm just my feet wet here.

    Thank you

    DW has no capability of database currently.  If you do programming server side with PHP and MySQL, there are commercial extensions, you can buy separately from the Web help and area of DMX.  But it's all depends on you how to work with data MySQL & PHP.  Development of applications for mobile devices is still a different learning curve.  I think DMX Zone has some extensions to help with that as well.

    http://www.DMXzone.com/go/32214/mobile-app-development/

    Nancy O.

  • Edit the list of kind on Media Player 11

    I would remove most of the kind of media player types.  As it is right now there are nearly 130 types of different kind in the list, which is simply ridiculous.  How can I get rid of these while I only left types 8 or 10 that I use.  Just to be sure that we are on the same wavelength, when I use 'Advance Tag Editor' and click on the drop down menu to 'Like' I want only a choice of 8 or 10 types, not 130.  Any help will be most appreciated.

    You may not be able to change the standard list, but you can easily define your own.
     
    In library, seen in genres, right clicik on a genre that you want to change, click on edit, type in what you want. All files that have the previous kind will now have the one you have chosen.
    Or if you want to be more selective, for the Album, select an album, do a right-click on the genre under the title, click on edit, change the genre for this album and all the files it contains.
    If you want the selected files to have a different genre of othersin the same album in an album, make sure that the type column appears. Select all files that belong to the genre you want to change, fight click click on modify and change the genre. Change will not display all of the selected files (but WMP then splits album of the separate entrances for Album corresponding to the different genres)
     
    "Tim De Baets," <=?utf-8?B?VGltIERlIEJhZXRz?=>wrote in message News: 4397ca91-b5f1-4288-bfa7-dedf5e4b40bf...

    I am afraid that you cannot modify this list. It contains standard ID3v1 genres and is probably hard-coded in WMP. Tim Baets
    http://www.BM-productions.TK

  • How can I generate multiple unique random numbers?

    Hello

    I am trying to generate multiple random numbers between a given set of numbers (1-52) and do not have the same number generated twice within this group. I can compare the numbers of last and next with the function to compare, but how would I go about comparison of all numbers generated without using a huge list of shift registers...

    Any help/ideas are welcome and appreciated.

    Jason

    Solved my problem. IM passing the random number through a registry to offset to each case and build a table every time. I then searches the table for the new random number. If the number is not found I get a value of-1, another thing is an index value of 0-everything. If a comparator greater than (-1) indicates that the same number is in the table and then I can raise this matter until the same number is not found.

    Kind regards

    Jason

  • Generate report for itself joined table

    Hi all

    I have a table in the following text:
    Create table test
    (
    VARCHAR2 (30) class name.
    number (5) number of grade
    )

    How can generate the report from the list of class for all grades in ONE SQL?

    Name of the class of Grade 1
    Class name1
    Class name2
    ..
    N class name
    Name of the class for the students of 2nd year
    Class name_1
    Class name_2
    ...
    Class name_n
    ...
    Name of the class for year n
    Class name_a
    Class name_b
    ...
    Class name_z


    Thank you!

    Hello.

    It's almost what you want.

    CREATE TABLE COURSE
    (
         COURSE_NAME VARCHAR2(20) NOT NULL, --TYBE???
         GRADE_NUM NUMBER(3) NOT NULL  -- graDe
    );
    
    INSERT INTO course VALUES ('english-1',1);
    INSERT INTO course VALUES ('french-1',1);
    INSERT INTO course VALUES ('english-2',2);
    INSERT INTO course VALUES ('french-2',2);
    INSERT INTO course VALUES ('math-2',2);
    INSERT INTO course VALUES ('english-3',3);
    INSERT INTO course VALUES ('french-3',3);
    
    SELECT
         DECODE(LEVEL,1,'For all Grade-')||
         child||
         DECODE(LEVEL,1,' students, the list of the courses are') something
    FROM
    (
         SELECT TO_CHAR(grade_num) child, null parent FROM course UNION
         SELECT course_name child, TO_CHAR(grade_num) parent FROM course
    )
    START WITH parent IS NULL
    CONNECT BY PRIOR child = parent;
    
    SOMETHING
    --------------------------------------------------------------------------------------------
    For all Grade-1 students, the list of the courses are
    english-1
    french-1
    For all Grade-2 students, the list of the courses are
    english-2
    french-2
    math-2
    For all Grade-3 students, the list of the courses are
    english-3
    french-3                                                                                     
    
    10 rows selected
    

    I hope this helps.

    Kind regards.

  • Hide email list

    How to hide or remove recipients from a list given on the other? When I generate the message to the list, it shows that all he was sent.

    BCC: is designed for that.

    If you address a message to: or Cc: used, these will be visible to all recipients.

    If you include recipients with Bcc: and then, in general, these recipients will see to: and Cc: addresses, but not the Bcc: addresses.

    Note that this behavior is not guaranteed; It is possible to interpret the specifications for mean as Bcc: recipients can see the other BCC: had addresses. You should check how the smtp servers, you use to treat.

    If you use a mailing list and add it to a Bcc: address box, then all members Contacts will be Bcc: had.

    If you have any to: or Cc: addresses, then Thunderbird will send the message with "Undisclosed recipients" in the To: field because some smtp servers will refuse a message without a visible: address.

  • The list of custom device alias

    Hi all

    I'm trying to retrieve the list of aliases of a custom device and generate a file containing the list of aliases and the reference of the chain. I wanted to do before the depoyment of my device custom (for example, during the initialization stage). I have tried different means:

    (1) from the driver of the RT, I get the reference of the target and navigate the tree of thr to get the aliases Section. The problem is, apparently, that you can not get the aliases section. When I call get target Ref, I received the mention of the controller, and then I managed to get the parent (targets)... but I can't get the root node, and then get the alias Section...

    (2) after that that I wanted to use the API to run. I opened a connection to the workspace, call the list of aliases to Vi... But the problem is when I'm in the my custom device initialization stage, it is not started yet, so it returns an error and that you can not deploy

    (3) my last idea was to use the systemDefinitionAPI. But I don't know how to get the path to the custom device system definition file...

    I think that I have run out of idea... If anyone has a suggestion...

    There is a function on the system definition API you can call directly to translate a reference device custom in the definition corresponding system API node type. This type of node, you can navigate to the root and then find all defined aliases.

    The class is called NodeIDUtil. See the example below. Note there is also some other functions to translate the reference point in node types more specific, as a custom device, channels, etc., waveforms. For example, recorded in 2012.

  • How to display the drop-down list box in MS excel by using labview report generation toolkit? pleasepost code block diagram?

    How to display the drop-down list box in MS excel by using labview report generation toolkit? Please post the block diagram of the code so that I can able to generate from the drop-down list box in excel with the menu drop-down...

    Like this. (edition, use the reference forms instead of the reference to the worksheet)

    Ben64

  • Why my signal generator point-by-point gives a flat line?

    Hi all

    I use the screw point-by-point for the first time and is trying to generate a square wave to use. However, when I plug the output of a point-by-point square wave generator, it gives just a flat line (using values default values for the other parameters). But it works fine if I use the point-by-point noise generator, it shows on the list. Any ideas?

    See you soon

    fact...

  • In the 5.0 Apex selection lists

    I'm getting confused with the list of selection for Apex 5.0 feature. I build a report that is generated using values in select list. The problem is, Apex does not recognize the syntax : nom_element.

    I tried a very simple example described here http://docs.oracle.com/cd/E59726_01/doc.50/e39147/app_contrls001.htm#HTMDB29715 and it doesn't work, I get the following error:

    Error during rendering of the element on the page P2_EMPNO.

    ORA-06550: line 4, column 8: PL/SQL: ORA-00904: "DEPTNO": invalid identifier ORA-00904: "DEPTNO": invalid identifier ORA-06550: line 1, column 13: PL/SQL: SQL statement ignored ORA-00904: "DEPTNO": invalid identifier

    My selection follows (and there is a page element called P2_DEPTNO as selection list in my page):

    SELECT ename like d,

    EmpNo as r

    WCP

    WHERE deptno =: P2_deptno

    ORDER BY ename

    If I change a few numbers P2_deptno, everything is ok, the result appears correctly.

    I don't understand, what's wrong? Help me please!

    Thanks in advance!

    2608792 wrote:

    I'm getting confused with the list of selection for Apex 5.0 feature. I build a report that is generated using values in select list. The problem is, Apex does not recognize the syntax : nom_element.

    I tried a very simple example described here http://docs.oracle.com/cd/E59726_01/doc.50/e39147/app_contrls001.htm#HTMDB29715 and it doesn't work, I get the following error:

    Error during rendering of the element on the page P2_EMPNO.

    ORA-06550: line 4, column 8: PL/SQL: ORA-00904: "DEPTNO": invalid identifier ORA-00904: "DEPTNO": invalid identifier ORA-06550: line 1, column 13: PL/SQL: SQL statement ignored ORA-00904: "DEPTNO": invalid identifier

    My selection follows (and there is a page element called P2_DEPTNO as selection list in my page):

    SELECT ename like d,

    EmpNo as r

    WCP

    WHERE deptno =: P2_deptno

    ORDER BY ename

    If I change a few numbers P2_deptno, everything is ok, the result appears correctly.

    I don't understand, what's wrong? Help me please!

    Thanks in advance!

    Referring to your statement

    If I change a few numbers P2_deptno, everything is ok, the result appears correctly.

    I don't understand, what's wrong? Help me please!

    Because

    If you use the emp table, which is by default .deptno is supposed to validate only number you can desc emp

    EMP EMPNO NUMBER - 4 0 1 - - -
    ENAME VARCHAR2 10 - - - - -
    JOB VARCHAR2 9 - - - - -
    MGR NUMBER - 4 0 - - -
    HIREDATE DATE 7 - - - - -
    SAL NUMBER - 7 2 - - -
    COMM NUMBER - 7 2 - - -
    DEPTNO NUMBER - 2 0 - - -

    DEPTNO datatype is number, and you cannot pass varchar.

    Hope you got the point where is your fault.

  • It is scriptable to unscrew the paragraphs [or lists] to get blocks of text?

    The method I use is to break a story in many pages, split a block of text via the menu "Save options" + ' paragraph 'start' on the next page and then apply a script which unscrew all of the text. " But a lot of time and work involved not to mention that the stories not threads isolated in dozens of pages.


    But my scripts known to wire/unscrew the text might only manage the frames and never paragraphs.


    The idea is to convert this kind of paragraph/lists in four simple stories

    Fig. 180 - risk 2010-2014

    Fig. 181 -number of devaluation 2009-2014

    Fig. 182 - Inflation 2008

    Fig. 183 - average index of prices

    Probably a hiccup of copy/paste of my own:

    var main = function() {
      var ps, n;
      var hu;
      if ( !app.documents.length ||
      app.selection.length!=1 ||
      !(app.selection[0].properties.parentStory) ){
      alert("Please select a text frame");
      return;
      }
    
      hu =  app.activeDocument.viewPreferences.horizontalMeasurementUnits;
      vu =  app.activeDocument.viewPreferences.verticalMeasurementUnits;
    
      app.activeDocument.viewPreferences.horizontalMeasurementUnits =
      app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.POINTS;
    
      ps = app.selection[0].parentStory.paragraphs;
      n = ps.length;
    
      try {
      while ( n-- ) {
      createFrame ( ps[n] );
      }
      }
      catch(err){
      $.writeln ( ">>>"+err );
      }
    
      app.activeDocument.viewPreferences.horizontalMeasurementUnits = hu;
      app.activeDocument.viewPreferences.verticalMeasurementUnits = vu;
      if ( app.selection[0] instanceof TextFrame ) {
      app.selection[0].remove();
      }
      else {
      app.selection[0].parentTextFrames[0].remove()
      }
    }
    
    function createFrame (p) {
      var x1 = p.insertionPoints[0].horizontalOffset,
      x2 = p.insertionPoints[-2].endHorizontalOffset,
      y2 = p.characters[0].baseline,
      y1 = y2-p.characters[0].pointSize+3.35;
      y2+=5;
      var tf = app.activeDocument.layoutWindows[0].activePage.textFrames.add({geometricBounds:[y1,x1,y2,x2]});
      p.duplicate ( LocationOptions.AT_BEGINNING, tf.insertionPoints[0] );
    };
    var u;
    app.doScript ( "main();", u, u, UndoModes.ENTIRE_SCRIPT );
    

    Try again?

  • Producing a list of virtual machines not in a folder

    As the subject says, we back up our virtual machines via vRanger connection based on this record, they are in inventory / models and virtual computers. To ensure the backup all VM I would generate a weekly report that lists the virtual machines that are not in a folder. I am able to produce lists of virtual machines with the code below, but that doesn't really help me. I tried to use the name instead of "nom_de_dossier" data center with no luck. Is it even possible to do?

    Get-VM -Location (Get-Folder 'foldername') | Export-Csv -NoTypeInformation -UseCulture c:\VMInfo.csv
    

    Have you already tried that?

    Get-VM -Location (Get-Folder vm) -NoRecursion
    

    It uses the 'vm' hidden folder that contains all of the virtual machines at the root of the datacenter (s)

  • How to make a list of question field with the data type DATE?

    I have a column with the DATE data type. Using forms 6i I want to generate a poplist field of list item with this column while the value of the items in the list of names of days like SATURDAY, SUNDAY, MONDAY. If we change the date to a char data type, it won't work properly, but now with the data type DATE behind him, it gives the following error message

    "FRM-32082: invalid value for given the type of element."
    List WEEKREST
    Article: WEEKREST
    Block: EMPRESTS
    Form: module 3
    FRM-30085: unable to adapt to the shape for the release. »


    Using forms 6i how a list item field type DATE data which may contain names of days?

    Set your date as a hidden field (not shown) column. Create your item list with the names of day of varchar2. Create the list item as a base table field that accepts the values of text in the names of the days. On this area, create a when-validate-item trigger that translated the text into an actual date that it then uses to set the value of the real object of the base table.

  • How to obtain the list of topic titles and coresspoding names of HTM in RH 9?

    I need to generate a report containing a list of topic titles and names HTM vaues in RH9 project. Guidance on how this can be achieved?

    Use tools > reports > the menu heading Properies. If you use the Options button to deselect all options, you'll end up with exactly what you want. You can even export to TXT or RTF file.

  • Generate an incident error, Oracle

    Hi all

    purpose of test, to test my system monitoring and measurements, I need to generate an incident may be an error ORA-00600 or oracle similar;
    No idea how to generate this kind of errors?
    My database is RAC 11.2.0.2.3 on Redhat Linux 5.


    Thank you very much
    S

    Tested successfully with XE 11 G:

    SQL> declare
      2  a exception;
      3  pragma exception_init(a,-600);
      4  begin
      5  raise a;
      6  end;
      7  /
    declare
    *
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [],
    [], [], []
    ORA-06512: at line 5
    

    Source: http://www.bluegecko.net/download/breaking-oracle.pdf.

Maybe you are looking for