How to find end rowa with 1 digital duplicates in a table

Hello world

I have a customer requirement to get the records in a table that are end with the digital 1.

Few of the user accounts, added with a '1' at the end of their normal user IDs. Everything by making some process in-house, the system has created a new account with the '1' appended to the end.

So I need a query to correctly identify these users.

Here is the sample records:

PK1 userid name lastname email

1 AAA Jack smith j.smith@a

2 AAA1 Jack smith j.smith@a

3 BBB Scott S s.scott@a

4 BBB1 Scott S s.scott@a

Note: name and email id and name are the same

Of the above, I need to get the records of AAA1 and BBB1.

My output should be like below

AAA1 2 Jack

4 Scott BBB1

Please help me on this.

Thanks in advance.

Hello

One way to do that is to add a condition EXISTS to the above:

SELECT pk1, userid, name

From your_table m

WHERE SUBSTR (userid,-1) = "1" - or userid WHERE AS '%1 '.

AND THERE ARE)

SELECT 1

From your_table

WHERE userid | '1' = m.userid

AND name = $m.name

AND lastname = m.lastname

AND email = m.email

)

;

Tags: Database

Similar Questions

  • How to concatenate the string with a digital command?

    Hello

    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • How to find a list with all the shortcuts in EBS R12

    How everything,.
    Someone knows how to find all the shortcuts for R12 as CTRL + F11, F11, F4... etc?




    Thanks in advance,
    Bahchevanov.

    Someone knows how to find all the shortcuts for R12 as CTRL + F11, F11, F4... etc?

    You can search all of this (help > keyboard help).

    Thank you
    Hussein

  • How to find the program with high Internet usage

    Original title: I get a message that, due to a long term, my internet use program is too high. How can I find out what that this prog. is?

    With the help of paid AVG security.

    Vista

    Do not download movies or anything high usage.

    message appears everytime I go to the line. Have deleted the progs as much as poss

    Hello

    1 did you do changes on the computer before the show?

    2. What is the exact error message that you receive?

    3 you have installed any program of Internet service provider to track the use of the Internet?

    Clean boot

    See the following site:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.microsoft.com/kb/929135.

    Note: once you work with the boot, use step 7 in the link to set the computer back to start normally.

    If in case, you are connected via a wireless connection, click the start & Services one in time and to ensure wireless see corresponding section is checked (enabled).

     

     

  • SocialCast API: How to find private messages with subjects in their

    Hello!

    I use the api / conversations to send a private message with a new hashtag (for example #myNewTag) in it.

    But I can't manage to find this message later by using the following method: api/messages/search with q = #myNewTag,.

    I can't find the new subject itself with api/themes/research or api / themes...

    This new section is not visible in the view is exploration of the web application.

    How to create a private message with a new tag in there? (is that enough to insert #... in his body?)

    Thank you in advance for your help!

    guimcha

    Hi Guimcha - Hashtags, or topics are not supported in private Messages, because they are conversations private and not visible to the rest of the community. Topics can only be used in regular messages (groups, projects, challenges). You can tell when a topic/hashtag is validated successfully because it will turn into a hyperlink and create it's own page of topics.

    I hope this helps!

    -Samantha

  • How to find an element with correspondents?

    Gurus,

    Please clarify this for me


    I have two tables... We're item_master, second is dtls_stg, which are related to an element of the current column.

    In my table of dtls_stg, except the column elements it is another column, called pre_pack_seq, which holds the numbers like 1,2,3... There may be two or more items with so many pre_pack_seq for example

    Element pre-pack-seq
    1001 1
    1-1002
    2 1003
    1004 3
    1005 2
    1 1006
    1007 3


    my table of item_master:

    point item_parent item_grandparent tran_level
    1001 100 xxx 2
    1002 100 3 xxx
    1006 100 xxx 2

    Now I need to find a parent or grand-parent of the current element in the dtls_stg table, which is present in the master of the order of the day.

    That is to say for all the pre-pack-seq, which has the value of 1, I select these items and must check into the master of the order of the day if these items belong to the same item_parent or item_grandparent according to the tran_level of the point. (if tran_level = search the 2 item_parent and so tran_level = search the item_grandparent 3)
    If the 1001, 1002, 1006 (who have pre-pack-seq 1) belong to the same parent or grandparent according to tran_level (IE item_parent or item_grandparent of the item_master table should have same value) then it should continue with the next pre_pack_seq (duty to check for 2 and so on)...
    Let's assume that for a single item (s), the parent or grandparent is not corresponding, I show the item (from table dtls_stg). This should be done in the SQL and PL/SQL

    You can help plse

    Concerning

    Published by: user10369751 on September 28, 2008 12:53 AM

    Use:

    select  item,
            item_parent,
            pre_pack_seq
      from  (
             select  d.*,
                     m.item_parent,
                     count(distinct case tran_level when 2 then item_parent else item_grandparent end) over(partition by pre_pack_seq) cnt
               from  dtls_stg d,
                     item_master m
               where m.item = d.item
            )
      where cnt > 1
    /
    

    SY.

  • How to select only rows with multiple records below?

    Dear all,

    My Table looks at below:

    Table structure:
    CREATE TABLE T_20 (CONTROL NUMBER(10) NOT NULL,
                           PO NUMBER(10) NOT NULL,
                           AMENDNO NUMBER(3) NOT NULL,
                           FACTOR VARCHAR2(3) NOT NULL,
                           COMMENT_X VARCHAR2(40),
                           FLAG VARCHAR2(1))
    
    
    SQL> alter table t_20 add constraint t_20_pk primary key (control, po, amendno, factor);
    INSERT orders:

    SQL> INSERT INTO T_20 VALUES(101,1000,01,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1000,02,'MSC','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,00,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(101,1001,01,'NDP','NO COMMENT','Y')
      2  /
    
    1 row created.
    
    SQL> INSERT INTO T_20 VALUES(102,1002,00,'ABC','NO COMMENT','Y')
      2  /
    
    1 row created.
    out put:
    SQL> SELECT * FROM T_20
      2  /
    
       CONTROL         PO    AMENDNO FAC COMMENT_X                                F 
    ---------- ---------- ---------- --- ---------------------------------------- - 
           101       1000          1 MSC NO COMMENT                               Y 
           101       1000          2 MSC NO COMMENT                               Y 
           101       1001          0 NDP NO COMMENT                               Y 
           101       1001          1 NDP NO COMMENT                               Y 
           102       1002          0 ABC NO COMMENT                               Y 
    Now, I want to select only the control number that have several acht.

    In above example only control 101 with several PO 2 PO with 1000 and 1001
    So I need to select only this 101 related lines...

    for 102 having in. sinple folders then it will have to be removed... because I have millions of records in the primary table...
    someone you suggest query... Thank you..

    Thanks in advance
    Prasanth

    Try this

    select *
      from (
    select t.*, count(distinct po) over(partition by control) cnt
      from t_20
          )
     where cnt > 1
    
  • How to find a file with the author of 'unknown '. Its an antivirs software and I cannot locate the uninstall/remove. I already have 'Norton' and I don't want to "Avira" HOW THEN I DISCOVERED "WINDOWS the PROGRAMS of START-UP BLOCKED."

    Can I locate? It is in the "(chose fenêtres bloquées les programmes de démarrage) that lights up when I start my computer." but I disabled it and I know what to do, but how can I veiw the program 'windows blocked startup programs' if it does not start?

    answered in another thread

    http://social.answers.Microsoft.com/forums/en-us/vistafiles/thread/e425669e-93f8-457d-852b-4416bba88f3d
    Rob - bicycle - Mark Twain said it is good.

  • How to pass the content with in the cell in the table of rules xml

    Hi all the Scripting Guys,.

    I created a table using rules xml with 3 numbers of the cells where first cell contains some data and so on, but following the cell first line may of does contain all the data so in that cell of second data line moved to the first cell and thired data line moved to the second cell that is very worried about me since the second cell in each row must be in the second cell only.

    For Instance -: Required to output

    Title NUMPAGE Topic
    Title46The subject
    50Another topic
    54Object
    Title60Another topic
    64The subject

    I get script - put it:

    Title NUMPAGE Topic
    Title46The subject
    50Another topic
    54Object
    Title60Another topic
    64The subject

    myRuleSet = new Array ( new ProcessSec,
               new ProcessPara,
               new ProcessSecHead,
               new ProcessArt,
               new ProcessPG,
               );
    with(myDocument){
        var elements = xmlElements;
         __processRuleSet(elements.item(0), myRuleSet);
          } 
    
    function ProcessSecHead(myXPath){
        this.name = "ProcessSecHead";
        this.xpath = myXPath; 
        this.apply = function(myElement, myRuleProcessor){
       with(myElement){
                __skipChildren(myRuleProcessor);
                  var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
         myElement.move(LocationOptions.atBeginning, myContainerElement.xmlElements.item(-1).xmlElements.item(-1));
         }
        return true;
        }  
    }
    function ProcessPara(){
        this.name = "ProcessPara";
        this.xpath = "//para"; 
        this.apply = function(myElement, myRuleProcessor){
                var myNewElement = myContainerElement.xmlElements.add(app.documents.item(0).xmlTags.item("Row"));
            return true;
        }  
    }
    
    function ProcessArt(){
        this.name = "ProcessArt";
        this.xpath = "//para/aug"; 
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __processChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);   
            }
            return true;
        }  
    }
    function ProcessPG(myXPath){
        this.name = "ProcessPG";
        this.xpath = myXPath; 
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                __skipChildren(myRuleProcessor);
                var myNewElement = myContainerElement.xmlElements.item(-1).xmlElements.add(app.documents.item(0).xmlTags.item("Cell"));
                myElement.move(LocationOptions.atBeginning, myNewElement);
            }
            return true;
        }  
    }
    

    All would be greatly appreciated

    Mac

    Oops, I apologize. I misunderstood the requirement.

    And this example shows us why the rules XML in InDesign is not the most practical approach...

    Beforehand, for each , we went to the top parent and found a and copied in.

    But we did only want to do this for the first .

    But convert us all the , , and

    the knots in the table cells later, we therefore need to insert a space reserved for this place to avoid having a problem. (If not, we could hardcode the number of the column for and the
    lymph and prepopulate the nodes of the table...).

    So I'll offer several changes to the fragmentary manuscript, thus you can intergrate them and learn what is happening:

    First of all, let's change these helper functions to return a null value in the event that they do not find a child node, rather than return the node parent. This means that it is easier now to test their return values in case of not finding something, that is a case that we know today:

    // Handy subtree functions
    function firstChildTag(node, tag) {
        var i, e = node.xmlElements;
    
        for (i=0; i=0; i--) {
            if (e[i].markupTag === tag) {
                return e[i];
            }
        }
        return null;
    }
    

    Then, we must be able to copy nodes in particular places. Before we used it copied copyFromToChild() who always has nodes in the context node. But we need to be more general, copy the tags. We'll create a version that allows us to specify the destination:

    // Apply from() to the context node to get
    // a source node. Apply to() to the
    // context node to get a destination node.
    // Copy the source node in the specified
    // location (how) to the destination node.
    var copyFromTo = makeRule("copyFromTo",
    function (element, ruleProcessor, from, how, to) {
        var copy;
    
        // __processChildren(ruleProcessor);
        copy = from(element).duplicate();
        copy.move(how, to(element));
        __skipChildren(ruleProcessor);
        return XMLmm.stopProcessing;
    });
    

    It must also be able to add an empty tag in the other nodes in . Maybe in hindsight I should have just made a new node outside the subtree us work and then copied that every time with the function copyFromTo() above. But instead, I expanded addNode() (which is currently used to create rows in the table) to not take a fixed destination, but rather a function that returns a destination, so that the destination can then be compared to the context node:

    // Create a new node at parent. Doesn't do
    // anything with the XPath context node.
    var addNode = makeRule("addNode",
    function(element, ruleProcessor, where, tag) {
        var parent = where(element);
    
        if (parent) {
            parent.xmlElements.add(tag);
        }
        return XMLmm.continueProcessing;
    });
    

    Now, we can replace the first transformation rule (which allows to copy into all the s) article by another who works on each and copy to the beginning of the first brother according to . Note that the XPath specifier is "//section/section-head" rather than "/ / section" because we do not want to operate on the copy that we have inside the tree. Otherwise, we get double nodes.

    // For each , that it is a direct child of a 
    , // copy it inside the first child. // Next, move each
    node to the end of the , // placing it after the node. __processRuleSet(root, [ copyFromTo( "//section/section-head", function(n) { return n; }, LocationOptions.AT_BEGINNING, function(n) { return firstChildTag(n.parent,tags["para"]); }), moveFromTo( "//para", function(n) { return firstChildTag(n, tags.article); }, LocationOptions.AT_END, // This is more general than we need to be; we're moving // to "the end", but the end of WHAT? It need not be the // , it could be some other node. function(n) { return n; }) );

    Now, we need to deal with the other s that have no in them. I'm not proud of it, we could probably do better. And would certainly be easier without XML rules. Or if we had the position() XPath function:

    // This is kind of gross.
    // For each , if it does not contain a ,
    // add a  to it. This adds it to the *end*
    // of the 's chilld list.
    __processRuleSet(root, [
          addNode("//para", function(n) {
              if (!firstChildTag(n, tags["section-head"])) {
                 return n;
             } else {
                 return null;
             }
          }, tags["section-head"]),
          moveFromTo(
              "//para",
              function(n) { return firstChildTag(n, tags["section-head"]); },
              LocationOptions.AT_BEGINNING,
              function(n) { return n; })]);
    

    Oh, and finally, we have changed the way that worked addNode(), so adjust the another call to addNode for a function instead of an explicit node:

    So in the latest set of rules, change to:

    addNode("//para", function() { return table; }, tags.tr),
    

    It works for you?

  • How can find data in a colum prj_no in all the table of the same schema

    Hi all

    I find the list of tables with data that has prj_no = "Axis_11" for all tables in the same schema.



    Thank you
    Nr

    PNR wrote:
    I find the list of tables with data that has prj_no = "Axis_11" for all tables in the same schema.

    1. find the tables with a column of PRJ_NO name. You can find it in USER_TAB_COLUMNS
    2 write a query to read the data in each table, using the UNION/UNION ALL operators to merge the results for each table

  • find the percent with grep sign

    Hello. I know it must be simple, but I can't seem to find it: how to find the percent with grep sign? Or % or -% nor [%] seem to do.

    Thank you

    There is nothing in particular the % sign: you should be able to find it by using one of the three methods you have tried. Have a good overview of the control panel search/replace. Don't find it what domain contain only the %? No space lurking here? It is on a locked layer? You have a style of paragraph or character set in the Panel "Find format '?

    Peter

  • How to find and view the results in flash

    Hello friends,

    I work in Flash 8 and using AS 2.0 coding.

    I work with failover-page application. Here I have an option 'search '. I'll tell you the scenario.

    Here I am loading images/pages dynamically through xml. He loading and works as a page flipping. so far, it has been done. Now if you enter some text inside the search option and press, he must search all loaded images/pages and view pages resulted.

    How this feature is indeed. How to find the jpg with a given string?

    Your help will be really appreciated.

    Kind regards

    Rajesh

    You must have a database of information related to the pages.  If the pages are only jpeg images, then they will not be able to provide you with anything in the way of useful data searchable beyond possibly titles image.  So, you will need to create a database that contains all of the information in these pages that you can have your (matching chain) diagram of function search works with to find matching information.

  • How to find the dependence of a table

    Hi all

    How to find all packages or procedure which are using specific table. is there a table where we can go and search.
    I want to say I called table_A table say and I want to find in what procedure or package will use this table.

    Thank you
    Sree

    Hello

    Query user_source

    Concerning
    Sarah

  • With the help of Hewlett Packard Win 7 64 bit with Lightroom 5.7. I have read many explanations of how to drag and drop digital images in Lightroom - but I never got.  I need to know WHERE LTRM drop, HOW to find them and how to get them I

    I need to know EXACTLY how to drag and drop digital pictures into LTRM. WHERE to put them. HOW to find them. How to MOVE in the DEVELOPMENT MODULE.

    When you drag / drop photos, you actually perform a step to import, so it would be wise to figure out how to import your photos and all of the affected options. I agree with Jim Hess and al., drag / drop are an easy way to screw up your organization. Importing is a much more organized way to manage things. There are a lot of tutorial vid3os on import.

  • I can't share the pictures taken with a digital camera on my iPad and iPhone 5s so I find them on my Mac mini

    I don't have happen not to share photos taken with a digital camera Sony DSC - H 200 on all my Apple iPad and iPhone 5 s devices while they are on the photo software my Mac mini comment can I do pay back them on all of my devices?

    Google translate:

    I can't share photos taken with a digital camera on my iPad and iPhone 5 s when I find them on my Mac mini

    I don't seem to share photos taken with a digital camera Sony DSC - H 200 on my Apple iPhone all 5s and iPad devices while they are on the photo in my Mac mini powerful software be, I do it to get them on all of my devices?

    I can't understand what you mean. To get photos from your computer to your iPhone, you can synchronize them. For information on how to view:

    Keep your photos safely stored and updated on all your devices - Apple Support

Maybe you are looking for