Stuck on a sql query to search for records that have the same parent child records

Oracle 10 g 2 Enterprise Edition.

Hello

I'm writing a logic to find records in a parent table, who have the same values in a child table.
This is part of a larger application, but I am stuck on that part for now, so I have mocked some of the below simplified tables to capture the heart of the
the problem is that I'm stuck.
Let's say I have a responsible parent, child employee table table and there are a number of many relationships between them.
The aptly named Join_Table manages the relationship between them. If a manager can manage several employees, an employee can be managed by
many managers.

I have a feeling it's stupidly easy, but it seems to me having a bad episode of brain freeze today!
-- parent table
CREATE TABLE manager (
 id      number primary key,
 name      varchar2(100));

-- child table 
CREATE TABLE employee (
 id          number primary key,
 name      varchar2(100));

-- link table
CREATE TABLE join_table (
 manager_id          NUMBER, 
 employee_id      NUMBER,
 CONSTRAINT join_table_pk PRIMARY KEY (manager_id, employee_id),
 CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES manager(id),
 CONSTRAINT employee_fk FOREIGN KEY (employee_id) REFERENCES employee(id) 
 );

-- Insert some managers
INSERT INTO manager (id, name) VALUES (1, 'John');
INSERT INTO manager (id, name) VALUES (2, 'Bob');
INSERT INTO manager (id, name) VALUES (3, 'Mary');
INSERT INTO manager (id, name) VALUES (4, 'Sue');
INSERT INTO manager (id, name) VALUES (5, 'Alan');
INSERT INTO manager (id, name) VALUES (6, 'Mike');

-- Insert some employees 
INSERT INTO employee (id, name) VALUES (101, 'Paul');
INSERT INTO employee (id, name) VALUES (102, 'Simon');
INSERT INTO employee (id, name) VALUES (103, 'Ken');
INSERT INTO employee (id, name) VALUES (104, 'Kevin');
INSERT INTO employee (id, name) VALUES (105, 'Jack');
INSERT INTO employee (id, name) VALUES (106, 'Jennifer');
INSERT INTO employee (id, name) VALUES (107, 'Tim');

-- Insert the links
-- John manages Paul, Simon, Ken
INSERT INTO join_table (manager_id, employee_id) VALUES (1, 101);
INSERT INTO join_table (manager_id, employee_id) VALUES (1, 102);
INSERT INTO join_table (manager_id, employee_id) VALUES (1, 103);
-- Bob manages Paul, Simon, Kevin, Jack
INSERT INTO join_table (manager_id, employee_id) VALUES (2, 101);
INSERT INTO join_table (manager_id, employee_id) VALUES (2, 102);
INSERT INTO join_table (manager_id, employee_id) VALUES (2, 104);
INSERT INTO join_table (manager_id, employee_id) VALUES (2, 105);
-- Mary manages Jennifer, Tim
INSERT INTO join_table (manager_id, employee_id) VALUES (3, 106);
INSERT INTO join_table (manager_id, employee_id) VALUES (3, 107);
-- Sue manages Jennifer, Tim
INSERT INTO join_table (manager_id, employee_id) VALUES (4, 106);
INSERT INTO join_table (manager_id, employee_id) VALUES (4, 107);
-- Alan manages Paul, Simon, Ken, Jennifer, Tim
INSERT INTO join_table (manager_id, employee_id) VALUES (5, 101);
INSERT INTO join_table (manager_id, employee_id) VALUES (5, 102);
INSERT INTO join_table (manager_id, employee_id) VALUES (5, 103);
INSERT INTO join_table (manager_id, employee_id) VALUES (5, 106);
INSERT INTO join_table (manager_id, employee_id) VALUES (5, 107);
-- Mike manages Paul, Simon, Ken
INSERT INTO join_table (manager_id, employee_id) VALUES (6, 101);
INSERT INTO join_table (manager_id, employee_id) VALUES (6, 102);
INSERT INTO join_table (manager_id, employee_id) VALUES (6, 103);

-- For sanity
CREATE UNIQUE INDEX employee_name_uidx ON employee(name);
If I ask for Manager John, so I want to find other managers who manage the exact list and even employees.
Answer should be Mike.
If I ask for Manager of Mary, the answer should be Sue.

This query will give me the list of managers who manage some of the same employees as John, but not the same employees accurate...
SELECT DISTINCT m.name AS manager
FROM manager m, join_table jt, employee e
WHERE m.id = jt.manager_id
AND jt.employee_id = e.id
AND e.id IN (
     SELECT e.id
     FROM manager m, join_table jt, employee e
     WHERE m.id = jt.manager_id
     AND jt.employee_id = e.id
     AND m.name = 'John')
ORDER BY 1;
I thought about using set operations to find managers with a list of employees less than my employees is null and where my employees under their list of employees is null. But there must be an easier way more elegant.
Any ideas?
BTW, I need to run as a batch on tables with > 20 million rows so the efficiency of queries is key.

What about...

WITH manager_list AS
(
 SELECT name,
        LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
        KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
 FROM   (SELECT m.name,
                e.id,
                ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
         FROM   manager m,
                join_table jt,
                employee e
  WHERE m.id           = jt.manager_id
  AND   jt.employee_id = e.id
  AND   m.name = :P_MANAGER)
  GROUP BY name
  CONNECT BY prev = PRIOR curr AND name = PRIOR name
  START WITH curr = 1
), all_list AS
(
 SELECT name,
        LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
        KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
 FROM   (SELECT m.name,
                e.id,
                ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
         FROM   manager m,
                join_table jt,
                employee e
  WHERE m.id           = jt.manager_id
  AND   jt.employee_id = e.id)
  GROUP BY name
  CONNECT BY prev = PRIOR curr AND name = PRIOR name
  START WITH curr = 1
)
SELECT a.*
FROM   manager_list m,
       all_list a
WHERE  m.employees = a.employees

Would be easier in 11g, but I do not have a facility here so this is based on 10g.

See you soon

Ben

Tags: Database

Similar Questions

  • query to view separate lines that have the same values

    Hello

    I have the columns id, addr1, addr2, city and State of coding. I need to know all the coding IDS that have the same addresses and at the same time filter out the same side of the id of the request.

    For example:

    acctid addr1, addr2 City State

    WEF 1 101 101 sd

    1                         101          wef     sd

    WEF 2 101 101 sd

    WEF 3 101 101 sd

    DC 4 102 102 homeless

    From the above data, I want to get filter tier 4 and get lines 1, 2 and 3. How to achieve with a sql query

    Thank you

    Arch

    This has nothing to do with hard... coding is how you test a query without creating the table, so you'd:

    with match_finder AS (SELECT acctid, addr1, addr2, city, State, count (*) OVER (PARTITION BY addr1, addr2, city, province) AS identical_rows)

    OF )

    Select acctid, addr1, addr2, city, province

    of match_finder

    where identical_rows > 1

    /

    and the rest, I'm sure, you can find on your own...

    HTH

  • How to identify columns that have the same data in a SQL query or function?

    Deal all,

    How to identify columns that have the same data in a SQL query or function? I have the sample data as below

    DEPT_IDEMP_IDCome on
    !CITYSTATECOUNTRY111 June 1983DELHIHUMAN RESOURCESIndia1218 January 1987DELHIHUMAN RESOURCESIndia1328 November 1985DELHIHUMAN RESOURCESIndia144 June 1985DELHIHUMAN RESOURCESIndia255 June 1983MUMBAIHDIndia266 June 1983MUMBAIHDIndia277 June 1983MUMBAIHDIndia288 Jun. 1983MUMBAIHDIndia399. June 1983GURGAONDLIndia31010 June 1983GURGAONDLIndia

    Now, I want to Indify columns that have the same data for the same Department ID.

    Is it possible in sql unique or do I have to write the function for this? Pls Help how to write?

    Thanks in advance.

    You can try this?

    WITH T1)

    DEPT_ID, EMP_ID, DATE OF BIRTH, CITY, STATE, COUNTRY

    ), ()

    SELECT 1, 1, TO_DATE('1.) June 1983', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 2, TO_DATE('18.) January 1987', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 3, TO_DATE('28.) November 1985', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 1, 4, TO_DATE('4.) June 1985', 'JJ. LUN. (YYYY'), 'DELHI', 'HR', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.5, TO_DATE('5.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.6, TO_DATE('6.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.7, TO_DATE('7.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 2.8, TO_DATE('8.) June 1983', 'JJ. LUN. (YYYY'), 'BOMBAY', 'HD', 'INDIA' OF THE DUAL UNION ALL

    SELECT 3, 9, TO_DATE('9.) June 1983', 'JJ. LUN. (YYYY'), 'GURGAON', 'DL', 'INDIA' OF THE DUAL UNION ALL

    SELECT 3.10, TO_DATE('10.) June 1983', 'JJ. LUN. (YYYY'), 'GURGAON', 'DL', 'INDIA' OF THE DOUBLE)

    SELECT DEPT_ID,

    RTRIM (XMLAGG (XMLELEMENT(A,VALS||',')). Extract ('//Text ()'), ',') COLUMNS_WITH_DUPLICATE

    DE)

    SELECT * FROM)

    SELECT DEPT_ID,

    EMP_ID,

    Date of birth

    CITY,

    STATE,

    COUNTRY

    DE)

    SELECT DEPT_ID,

    EMP_ID,

    Date of birth

    CITY,

    STATE,

    COUNTRIES,

    COUNT (*) OVER(PARTITION BY DEPT_ID ORDER BY EMP_ID DESC,DOB DESC,CITY DESC,STATE DESC, COUNTRY DESC) RN

    DE)

    SELECT DEPT_ID,

    CASE WHEN(CEID>1) AND THEN 'YES' ELSE 'NO' END AS EMP_ID.

    CASE WHEN(CDOB>1) THEN 'YES' ELSE 'NO' END AS DATE OF BIRTH,

    CASE WHEN(CCITY>1) AND THEN 'YES' ELSE 'NO' END AS CITY.

    CASE WHEN(CSTATE>1) AND THEN 'YES' ELSE 'NO' END AS STATE.

    CASE WHEN(CCOUNTRY>1) THEN 'YES' ELSE 'NO' END AS A COUNTRY

    DE)

    SELECT DISTINCT

    DEPT_ID,

    CEID,

    CDOB,

    CITY,

    CSTATE,

    CCOUNTRY

    DE)

    SELECT DEPT_ID,

    COUNT (*) TO THE CEID (DEPT_ID PARTITION, EMP_ID),.

    COUNT (*) ON CDOB (DEPT_ID SCORE, DATE OF BIRTH),

    COUNT (*) ON THE CITY (DEPT_ID PARTITION, CITY),

    COUNT (*) ON CSTATE (DEPT_ID PARTITION, STATE).

    COUNT (*) ON CCOUNTRY (DEPT_ID, COUNTRY PARTITION)

    FROM T1)))

    WHERE RN = 1)

    UNPIVOT (CLO FOR (VALS) IN (EMP_ID, DATE OF BIRTH, CITY, STATE, COUNTRY)))

    WHERE COLS = "YES".

    DEPT_ID GROUP;

    OUTPUT:

    DEPT_ID COLUMNS_WITH_DUPLICATE
    --------- ------------------------

    1 CITY, COUNTRY, STATE
    2 CITY, COUNTRY, STATE
    3 CITY, COUNTRY, STATE

    Post edited by: Parth272025

  • How can I check for dates that are the same for today.

    If I have a bunch of dates in a datetime colum. How can I check for dates that are the same for today.
    "For example, this value of days would be ' #dateFormat (now (),"mm dd yyyy") #

    The best I could come up with was:

    Select * from data where data.userID =
    2635 AND
    "Convert (varchar, dateAdded, 101) = ' #dateFormat (now (),"mm dd yyyy") #


    How can I get this to work smart peeople :)

    It is best to make the comparison on the datetime values. One technique is to get the current date at midnight. Then add one day to get tomorrow's date. In your sql query finds all values is greater than or equal to today and less than tomorrow.

    One solution is to do everything in MS SQL

    WHERE the dateAdded > = convert (datetime, convert (varchar, getdate(), 112), 112)
    AND dateAdded = dateAdd (d, 1, convert (datetime, convert (varchar, getdate(), 112), 112))

    Another option could be to use CF to calculate dates:


    WHERE the dateAdded > =.
    AND dateAdded<>

  • SQL query to search for the line that contains the identifier for each consecutive group

    Hello

    I'm on 11.2.0.3 Enterprise Edition.

    I have a strange request here - do not know if this is possible without going to procedure...

    Given these data of the sample:

    create table test_status (
      status varchar2(10),
      revision_id number,
      revision_timestamp timestamp);
    
    insert into test_status values ('PROPOSED', 1, systimestamp);
    insert into test_status values ('PROPOSED', 2, systimestamp);
    insert into test_status values ('PROPOSED', 3, systimestamp);
    insert into test_status values ('ACTIVE', 4, systimestamp);
    insert into test_status values ('ACTIVE', 5, systimestamp);
    insert into test_status values ('PROPOSED', 6, systimestamp);
    insert into test_status values ('PROPOSED', 7, systimestamp);
    insert into test_status values ('ACTIVE', 8, systimestamp);
    insert into test_status values ('ACTIVE', 9, systimestamp);
    insert into test_status values ('FINISHED', 10, systimestamp);
    insert into test_status values ('FINISHED', 11, systimestamp);
    insert into test_status values ('FINISHED', 12, systimestamp);
    

    Gives me:

    SQL> select *
      2  from test_status
      3  order by revision_id;
    
    
    STATUS     REVISION_ID REVISION_TIMESTAMP
    ---------- ----------- -----------------------------
    PROPOSED             1 25-SEP-14 04.49.47.954000 PM
    PROPOSED             2 25-SEP-14 04.49.47.962000 PM
    PROPOSED             3 25-SEP-14 04.49.47.966000 PM
    ACTIVE               4 25-SEP-14 04.49.47.969000 PM
    ACTIVE               5 25-SEP-14 04.49.47.972000 PM
    PROPOSED             6 25-SEP-14 04.49.47.976000 PM
    PROPOSED             7 25-SEP-14 04.49.47.979000 PM
    ACTIVE               8 25-SEP-14 04.49.47.982000 PM
    ACTIVE               9 25-SEP-14 04.49.47.987000 PM
    FINISHED            10 25-SEP-14 04.49.47.991000 PM
    FINISHED            11 25-SEP-14 04.49.47.996000 PM
    FINISHED            12 25-SEP-14 04.49.48.000000 PM
    
    
    12 rows selected.
    ws selected.
    

    I want to get this result:

    STATUS     REVISION_ID REVISION_TIMESTAMP
    ---------- ----------- ----------------------------
    PROPOSED             3 25-SEP-14 04.49.47.966000 PM
    ACTIVE               5 25-SEP-14 04.49.47.972000 PM
    PROPOSED             7 25-SEP-14 04.49.47.979000 PM
    ACTIVE               9 25-SEP-14 04.49.47.987000 PM
    FINISHED            12 25-SEP-14 04.49.48.000000 PM
    

    Then query the table ordered by Revision_Id, I would get the line containing the highest revision for each consecutive group of status values.  I am able to get the line containing the highest revision for each separate status, value, but I can't deal with the scenario where a state value reappears later.  In the case of the real world, it is a workflow and I need to take into account the fact that an element through the workflow may be redirected to the back front she proceeds forward again.

    Hope it makes sense.

    Thank you

    John

    Hi, John,.

    John OToole (Dublin) wrote:

    Hello

    I'm on 11.2.0.3 Enterprise Edition.

    I have a strange request here - do not know if this is possible without going to procedure...

    ...

    Do not no stinkin' procedure:

    WITH got_grp_id AS

    (

    SELECT the status, revision_id, revision_timestamp

    ROW_NUMBER () OVER (ORDER BY revision_id)

    -ROW_NUMBER () (PARTITION STATUS

    ORDER BY revision_id

    ) AS grp_id

    OF test_status

    )

    SELECT status

    MAX (revision_id) AS revision_id

    MAX (revision_timestamp) DUNGEON (DENSE_RANK LAST ORDER BY revision_id)

    AS revision_timestamp

    OF got_grp_id

    GROUP BY status, grp_id

    ORDER BY revision_id

    ;

    For an explanation of the technique of Difference sets used here, see

    Analytic Question lag and lead and/or

    Re: Ranking of queries

  • Query to search for users based on the State of the resource

    Hi all

    I'm working on version 9 x IOM. I need to find all the users of a resource that is in "Ready" status in the profile of their resources

    Let say resource Genetiquea is here and for some users of the status of this resource in their resources profile is in "ready". I want to get these users.

    Melyssa, help me with this SQL query.

    Thank you
    Madhu

    Try this query:
    Select usr.usr_login, obj.obj_name, ost.ost_status, usr, obj, obi, Ouedraogo, ost where usr.usr_key = oiu.usr_key and obi.obi_key = oiu.obi_key and obi.obj_key = obj.obj_key and ost.ost_key = oiu.ost_key and obj.obj_name =''

    You can add: and ost.ost_status = to find the status as well.

    Kind regards
    GP

  • SQL query to search for a single line

    Hi All-
    I have a requirement where I have to get the id who subscribe only to a single course based on data below.

    ID courses
    103812 CFH
    102968 REP
    103812 DFH
    DFH 102968
    103071 DFH
    CFH 102968

    CREATE TABLE classes
    (IDENTIFICATION NUMBER,
    course VARCHAR2 (3));

    insert into class values (103812, "CFH");
    insert into class values (102968, "REP");
    insert into class values (103812, "DFH");
    insert into class values (102968, "DFH");
    insert into class values (103071, "DFH");
    insert into class values (102968, "CFH");

    SELECT THE ID
    IN THE COURSE OF
    GROUP BY ID
    AFTER HAVING COUNT (RACE) = 1;

  • SQL query to get the employee details for those who have the same salary

    Hi Experts,
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> WITH EMP AS
      2  (
      3  SELECT 1000 EMPNO,100 SAL FROM DUAL UNION ALL
      4  SELECT 1001,90 FROM DUAL UNION ALL
      5  SELECT 1002,80 FROM DUAL UNION ALL
      6  SELECT 1003,90 FROM DUAL UNION ALL
      7  SELECT 1004,100 FROM DUAL UNION ALL
      8  SELECT 1005,20 FROM DUAL UNION ALL
      9  SELECT 1006,10 FROM DUAL
     10  )SELECT * FROM EMP;
    
         EMPNO        SAL
    ---------- ----------
          1000        100
          1001         90
          1002         80
          1003         90
          1004        100
          1005         20
          1006         10
    
    7 rows selected.
    SQL>
    Desired output:
         EMPNO        SAL
    ---------- ----------
          1000        100
          1004        100
          1001         90
          1003         90
    Please suggest how to work on the request?

    Thank you

    Oh, try

    WITH EMP AS
        (
        SELECT 1000 EMPNO,100 SAL FROM DUAL UNION ALL
        SELECT 1001,90 FROM DUAL UNION ALL
        SELECT 1002,80 FROM DUAL UNION ALL
        SELECT 1003,90 FROM DUAL UNION ALL
        SELECT 1004,100 FROM DUAL UNION ALL
        SELECT 1005,20 FROM DUAL UNION ALL
        SELECT 1006,10 FROM DUAL
       )
    SELECT * FROM EMP WHERE SAL IN (
    SELECT SAL FROM (
    SELECT count(sal) OVER (PARTITION BY SAL ORDER BY EMPNO) SAL_CNT, SAL FROM EMP
    )
    WHERE  SAL_CNT >1)
    ORDER BY SAL DESC;
    
    EMPNO     SAL
    1004     100
    1000     100
    1003     90
    1001     90
    4 rows returned in 0.01 seconds
    

    * 009 *.

  • Search for users who have the SYSADMIN responsibility

    I want to find all the users who has SYSADMIN responsibility.


    clues?

    I want to find all the users who has SYSADMIN responsibility.

    clues?

    Application: submit the program simultaneous "users of a responsibility."

    Of the database:

    SQL> SELECT fu.*
    FROM fnd_user_resp_groups_direct furgd, fnd_responsibility_vl frvl, fnd_user fu
    WHERE furgd.responsibility_id = frvl.responsibility_id
    AND fu.user_id = furgd.user_id
    AND(to_char(furgd.end_date) is null
    OR furgd.end_date > sysdate)
    AND frvl.end_date is null
    AND frvl.responsibility_name = 'System Administrator'; 
    

    See also old son queries - http://forums.oracle.com/forums/search.jspa?threadID=&q=Query+AND+Users+AND+Responsibilities&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001

    Thank you
    Hussein

  • How can I search for multiple files at the same time?

    In windows XP, after the advanced search mode, I used to be able to search multiple files simply by adding a comma between them like this...

    90025,90028,90094

    and which returns 3 image files I was looking for.

    How can I do this in Windows 7?

    Use OR instead of the comma...
     
    90025 OR 90028 90094
     
    --
    Dave N.
    MS - MVP (Mail)
    Windows 7 Ultimate 64
    "Tziware" wrote in message
    News: * e-mail address is removed from the privacy... *
     
    In windows XP, after the passage in the advanced search mode, I used to be able to
    Search multiple files, simply by adding a comma between them as
    This...
     
    90025,90028,90094
     
    and which returns 3 image files I was looking for.
     
    How can I do this in Windows 7?
     
     

    Windows 7 Ultimate 64

  • query to search for the user of the application

    Hello

    What is the query to search for the user of the application in the sql command?

    I tried the query below
    select app_user from dual;
    app_user invalid identifier
    Thank you.

    Hello skud,
    The following SQL statement will give you the APP_USER which is an environmental variable in the APEX:

    SELECT v('APP_USER') FROM DUAL;
    

    See if it works. As I used the syntax given in the triggers to record audit trail above and it works fine.
    Kiran

    Published by: chubby Kiran June 11, 2011 04:08

    Published by: chubby Kiran June 11, 2011 04:09

  • How to search for a string in the order reversed through REGEXP_INSTR

    Hi all

    I have the SQL query in which I want to get the first position of the occurrence of the end of the string

    for example:
    String:NBANK-ASD-00-1001-525-1002
    Condition: the position of the character '-' the last. (Note: character can also be '-' or ' / ')
    output: 1002

    for above condition, I have a request next return


    SELECT SUBSTR('NBANK-ASD-00-1001-525-1002',REGEXP_INSTR('NBANK-ASD-00-1001-525-1002','[^-/]',1),LENGTH('NBANK-ASD-00-1001-525-1002 ')) FROM dual;



    but I'm getting more results

    NBANK-ASD-00-1001-525-1002
    means that the expression returns 0...

    pls help me solve this problem.

    You can change your query as follows

     SELECT SUBSTR('NBANK-ASD-00-1001-525-1002'
       , REGEXP_INSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       , LENGTH('NBANK-ASD-00-1001-525-1002'))
       FROM dual;
    ;
    

    but you can just use REGEXP_SUBSTR to get the same result...

     SELECT REGEXP_SUBSTR('NBANK-ASD-00-1001-525-1002', '[^-/]*$', 1)
       FROM dual;
    ;
    

    Kind regards
    Bob

  • Can I search for a word in the description of a bookmark?

    When I add a bookmark, I often add a description.
    Another reason why a lot of my favorites are the descriptions is that I am an old user of delicious and I imported these bookmarks in Firefox.
    So I would like to search for words that I wrote in the description, because the description is often more significant than the label, the name or the URL.
    But unfortunately Firefox does not resemble the description during the search in bookmarks.
    Nor find any extension.

    A backup of bookmarks HTML includes descriptions, so you could open such a backup in a tab and use the search bar to search the page.

    You can make Firefox create an automatic HTML (bookmarks.html) backup when you exit Firefox, if you set the pref to true on the subject browser.bookmarks.autoExportHTML: config page.

    This backup is created by default in the profile as bookmarks.html folder whenever you close Firefox, but you can set the file name and the path through the pref browser.bookmarks.file on the topic: config page.

    The pref browser.bookmarks.file does not exist by default and you must create a new pref to string with the name browser.bookmarks.file and set the value to the full path of the file backup bookmarks including the name of the file.

  • How can you get an iTunes card code goes through which is stuck on a peel off sticker and I don't have the receipt for refund or Exchange

    How can I get a card code iTunes pass go throu that is stuck on a peel off sticker and I don't have the receipt for refund or Exchange

    You can try to contact iTunes support, they are likely to want to see images of the front and back of the card, and they might also want to see a picture of the reception (you looked for the reception?): https://www.apple.com/emea/support/itunes/contact.html

  • How can I tell the mail client to search for new mail on the server?

    How can I tell the mail client to search for new mail on the server?

    Within the Mail app and display the Inbox you can pull down on the list of e-mail using your finger and you should see a small reel spinning gear. Which indicates that his check new email.

    You can also go into the settings of e-mail and calendars Contacts and view the settings there. Examine the settings of "search for new data. If the Push is enabled, then messages will be pushed to you if the email provider supports this feature. You can also set your accounts to use Fetch and set the frequency, he's going to go out and look for new e-mail messages.

Maybe you are looking for