Combination of line SQL

At my table

VAL SNO

1A

2A

3A

4A

11 B

12 B

21 C

22 C

VAL has 3 possible values here. It could be any number up to 17 and the output below can have 17 joines values together.

Example here is with 3 values

And I need my output as

1,11,21

1,12,21

1,11,22

1,12,22

2,11,21

2,12,21

2,11,22

2,12,22

3,11,21

3,12,21

3,11,22

3,12,22

4,11,21

4,12,21

4,11,22

4,12,22

Any help will be great

Hello

You can do something like this:

SELECT SYS_CONNECT_BY_PATH (sno, ",") AS the combination

FROM table_x

WHERE CONNECT_BY_ISLEAF = 1

START WITH val = "A".

CONNECTION BY ASCII (val) = 1 + CHR (val PREREQUISITE)

;

This assumes that val is predictable, for example, the lowest value will always be 'A', and following on values will be the next letter of the alphabet, until 'Q' If you have 17 values.

If you can not predict what will be the values of val, so it's a little more complicated:

WITH got_r_num AS

(

SELECT sno

DENSE_RANK () OVER (ORDER BY val) AS r_num,

FROM table_x

)

SELECT SYS_CONNECT_BY_PATH (sno, ",") AS the combination

OF got_r_num

WHERE CONNECT_BY_ISLEAF = 1

START WITH r_num = 1

CONNECT BY r_num = 1 + PRIOR r_num

;

If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

Tags: Database

Similar Questions

  • Combination of line SQL and grouping

    My data in the table looks

    SNO VAL GRP

    1. A G1

    2. A G1

    3. A G1

    4. A G1

    11 B G1

    12 B G1

    21 C G1

    22 C G1

    31 B G2

    34 B G2

    42 C G2

    46C G2

    48 C G2

    51 G2

    58 D G2

    66 F G2


    I wanted to create a view with output like below. The example that I gave to my previous question (combination line SQL)) me has really helped to learn new things, when when I try to create the view, I had to add field GRP out of combination and I failed.


    VAL is the field that decides the combination. If val has 3 possible options for a GRP, then I combine the each Val of the NSO and create together. VAL may have any number of possible values up to 17. This sector alone of combination worked with the answer to my last question. Now, I need to add the field group this as below. Any help to achieve this result will be great


    Combination GRP

    G1 1,11,21

    G1 1,12,21

    G1 1,11,22

    G1 1,12,22

    G1 2,11,21

    G1 2,12,21

    G1 2,11,22

    G1 2,12,22

    G1 3,11,21

    G1 3,12,21

    G1 3,11,22

    G1 3,12,22

    G1 4,11,21

    G1 4,12,21

    G1 4,11,22

    G1 4,12,22

    31,42,51,66 G2

    31,42,58,66 G2

    31,46,51,66 G2

    31,46,58,66 G2

    31,48,51,66 G2

    31,48,58,66 G2

    34,42,51,66 G2

    34,42,58,66 G2

    34,46,51,66 G2

    34,46,58,66 G2

    34,48,51,66 G2

    34,48,58,66 G2


    Create tables and Insert queries below if necessary

    Create the table table_x

    (SNO Number (3),)

    VARCHAR2 VAL (3),

    GRP VARCHAR2 (3));

    insert into values(1,'A','G1') table_x;

    insert into values(2,'A','G1') table_x;

    insert into values(3,'A','G1') table_x;

    insert into values(4,'A','G1') table_x;

    insert into values(11,'B','G1') table_x;

    insert into values(12,'B','G1') table_x;

    insert into values(21,'C','G1') table_x;

    insert into values(22,'C','G1') table_x;

    insert into values(31,'B','G2') table_x;

    insert into values(34,'B','G2') table_x;

    insert into values(42,'C','G2') table_x;

    insert into values(46,'C','G2') table_x;

    insert into values(48,'C','G2') table_x;

    insert into values(51,'D','G2') table_x;

    insert into values(58,'D','G2') table_x;

    insert into values(66,'F','G2') table_x;

    Hello

    In your first problem, it was as if all rows have the same value of grp, and you could do something like this:

    WITH got_r_num AS

    (

    SELECT sno

    DENSE_RANK () OVER (ORDER BY val) AS r_num,

    FROM table_x

    )

    SELECT SYS_CONNECT_BY_PATH (sno, ",") AS the combination

    OF got_r_num

    WHERE CONNECT_BY_ISLEAF = 1

    START WITH r_num = 1

    CONNECT BY r_num = 1 + PRIOR r_num

    ;

    But now, you have several values of grp, and each of them is a world unto itself, separate from all the other values of grp.

    In analytical functions, 'PARTITION BY grp' treats all grp as a full-fledged world values, separate all values of grp.

    In CONNECT BY, you can add "grp = grp PREREQUISITE" to the CONNECT BY clause to separate the grps.

    Here is a way to do it:

    WITH got_r_num AS

    (

    SELECT snogrp

    DENSE_RANK () OVER ( PARTITION BY grp

    ORDER BY val

    ) AS r_num

    FROM table_x

    )

    SELECT SUBSTR (SYS_CONNECT_BY_PATH (sno, ',')

    2

    ) AS combination

    grp

    OF got_r_num

    WHERE CONNECT_BY_ISLEAF = 1

    START WITH r_num = 1

    CONNECT BY r_num = 1 + PRIOR r_num

    AND grp = grp PRIOR

    ;

  • Combine multiple lines into one line (from two tables / result sets)

    Hello experts,

    I would like to know how to combine multiple lines/records in a single record. Here are the DDL and DML to tables:

    create table test_table)

    client_name varchar2 (50 char),

    login_time timestamp (6).

    logout_time timestamp (6).

    auto_type varchar2 (10 char)

    )

    create table root_table)

    navigation_time timestamp (6).

    client_name varchar2 (50 char),

    VARCHAR2 (50 char) nom_du_groupe

    )

    Insert into test_table

    values ("John", TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');

    Insert into test_table

    values ('David', TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "invalid");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:14:22.333 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), "David", "invalid");

    insert into root_table

    values (TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'David', 'GROUP_5');

    game results test_table

    client_name

    login_time logout_time auto_typeJohn05/12/2013 5:04:01.512000 PM05/12/2013 5:27:31.308000 PMSIMPLEDavid05/12/2013 6:33:01.308000 AM05/12/2013 6:45:01.112000 AMSIMPLE

    root_table result set

    navigation_time client_name GroupName
    05/12/2013 5:04:01.512000 PMJohnNot valid
    05/12/2013 5:14:22.333000 PMJohnGROUP_1
    05/12/2013 5:27:31.308000 PMJohnGROUP_1
    05/12/2013 6:33:01.308000 AMDavidNot valid
    05/12/2013 6:45:01.112000 AMDavidGROUP_5

    And here is the SQL code I'm writing:

    Select a.customer_name, a.login_time, a.logout_time, a.auto_type, Max (b.group_name)

    from test_table a, b root_table

    where a.customer_name = b.customer_name

    Group of a.customer_name, a.login_time, a.logout_time, a.auto_type

    As the 'invalid' value is greater than the value "GROUP_1" (based on the number of letter in English), the GroupName is returned as 'invalid '. I want to bring the GroupName based on the navigation_time column in the root_table so that it always returns a valid GroupName. Please help me.

    Output current:

    Client_name.      Login_Time.     Logout_Time |     Auto_Type |     GroupName

    --------------------------------------------------------------------------------------------------------------------------------------------

    John |     05/12/2013 5:04:01.512000 PM |     05/12/2013 5:27:31.308000 PM |     SIMPLE |     Not valid

    David |     05/12/2013 6:33:01.308000 AM |     05/12/2013 6:45:01.112000 AM |     SIMPLE |     Not valid

    Expected results:

    Client_name.      Login_Time.     Logout_Time |     Auto_Type |     GroupName

    --------------------------------------------------------------------------------------------------------------------------------------------

    John |     05/12/2013 5:04:01.512000 PM |     05/12/2013 5:27:31.308000 PM |     SIMPLE |     GROUP_1

    David |     05/12/2013 6:33:01.308000 AM |     05/12/2013 6:45:01.112000 AM |     SIMPLE |     GROUP_5

    Thank you!

    Adding INSERT statements, current and planned outputs.

    This...

    SELECT client_name

    login_time,

    logout_time,

    auto_type,

    GroupName

    Of

    (select a.customer_name,

    a.login_time,

    a.logout_time,

    a.auto_type,

    b.group_name,

    ROW_NUMBER() over (PARTITION BY a.customer_name, a.login_time, a.logout_time, a.auto_type ORDER BY b.group_name) rn

    from test_table a, b root_table

    where a.customer_name = b.customer_name)

    WHERE rn = 1;

    OUTPUT:-

    =========

    David DECEMBER 5, 13 06.33.01.308000000 AM DECEMBER 5, 13 06.45.01.112000000 AM SIMPLE GROUP_5
    John DECEMBER 5, 13 05.04.01.512000000 PM DECEMBER 5, 13 05.27.31.308000000 PM SIMPLE GROUP_1

    Thank you

    Ann

  • Integrate a command-line sql in oracle

    Due to licensing issues, we will have to avoid the access to our database of customer production other than the application developed in forms and reports.

    Do you know if there is an easy way to integrate a command-line sql in a form, using the existing connection? a bean pjc?

    juliojgs wrote:

    The application is ours. We also provide support services, not only the development, but still help them with data in their database of production (updates massive, backdoor... fixing data errors)

    The dba just told me that, with the new licensing scheme, we cannot even login sqldeveloper of our client machines to this support for data, then to look for a new way to do. What we can do is to run the application, is the reason for the requirement of the incorporation of a tiny sql Forms client.

    Sounds like licenses incorporated. Your customer is only allowed to use the Oracle software in conjunction with your product and is not allowed to use * any * oracle configuration / administration tool (SQL * more / expdp / rman / dbca / dbua...), but only the tools you provide.

    However; providing a text box where the end user is again able to enter simple SQL statements certainly is not respect the integrated license agreement.

    see you soon

  • Could not connect to command line SQL Oracle XE

    Hello
    I use Oracle Xe on windows XP... I can connect to SQLPLUS using the windows shell with each of them to the account user and password as
    --------------------------------------------------------------------------------------------------------------
    Microsoft Windows XP [Version 5.1.2600]
    Copyright (C) 1985-2001 Microsoft Corp.

    H:\ > SQLPLUS MAYA/MARCO

    SQL * more: Release 10.2.0.1.0 - Production Thu Jun 30 17:28:12 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL >_
    ---------------------------------------------------------------------------------------------------------------
    but when I use the command line SQL Oracle to start-> all programs/Oracle Database 10 g Express Edition / * execute SQL Command Line * it brings the command SQL line with a quick line of SQL, but it connects to the database.

    ---------------------------------------------------------------------------------------------------------------
    SQL * more: Release 10.2.0.1.0 - Production Thu Jun 30 17:36:12 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    SQL > Select * from cat.
    SP2-0640: not connected
    SQL >
    ----------------------------------------------------------------------------------------------------------------
    and I met with the error "not connected". I'm sure that the database has already started successfully.
    Can you please let me know I'm doing wrong or what is problem with Oracle SQL Command Line?

    Thank you

    Hello

    What is

    connect MAYA/MARCO

    You can issue a query later?

    Kind regards

  • combine several pl/sql in a single associative array

    Hello
    I use oracle 10g, can anyone suggest me how to combine several pl/sql in a single Bay.

    ex:
    TYPE t_array IS TABLE OF VARCHAR2 (100)
          INDEX BY BINARY_INTEGER;
    
       v_subnasp        pk_rules.t_array;
       v_product        pk_rules.t_array;
       v_order_type   pk_rules.t_array;
       v_combine       pk_rules.t_array;
    I want to combine the data in v_subnasp, v_product, v_order_type to v_combine

    DeepakDevarapalli wrote:
    Sorry, I think that my question is not clear. can I move data from 3 tables on a Bay. and what is the best way. I found a way using loops.

    If you declare an associative array type - loop is pretty much your only option. If you declare the nested table type, you can use operatots of type multiset:

    DECLARE
       TYPE t_array IS TABLE OF VARCHAR2(100);
       v_subnasp        t_array := t_array(1);
       v_product        t_array := t_array(2);
       v_order_type     t_array := t_array(3);
       v_combine        t_array;
    BEGIN
        v_combine := v_subnasp multiset union all v_product multiset union all v_order_type;
        for i in 1..v_combine.count loop
          dbms_output.put_line('Element ' || i || ' = ' || v_combine(i));
        end loop;
    END;
    /
    Element 1 = 1
    Element 2 = 2
    Element 3 = 3
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

    Published by: Solomon Yakobson, December 14, 2009 11:19

  • Combine similar lines

    For example,.

    select s.sid, s.username, t.SQL_TEXT
    from gv$sqltext t, gv$session s
    where s.sql_address=t.address
    order by s.sid, t.piece;
    

    which returns a SID, user name and 64 characters in sql, the following line will show 64 characters and so on.

    So I would be able to combine all the t.SQL_TEXT where s.SID and s.USERNAME are the same as the previous line, as such:

    Front

    SID USERNAME SQL_TEXT

    1 USER1 select bla blah blah blah 64 characters long

    1 USER1 second 64 to 128 character set

    1 long USER1 questioning more than 64 characters

    1 USER1 will still more than 64 characters more

    After

    1 USER1 select bla blah blah blah 64 longsecond 64 query 128long 64 charactersstill character set characters more go longer than 64 characters

    (Note: no spaces between strings of SQL_TEXT.)  If they should be there, they are considered as a character)

    Thanks for the help!

    Hello

    This looks like a job for the LISTAGG function, something like this:

    SELECT s.sid, s.username

    , LISTAGG (t.sql_text, NULL) WITHIN GROUP (ORDER BY t.piece) AS sql_text

    SGS $ sqltext t

    , gv$ session s

    WHERE s.sql_address = t.address

    GROUP BY s.sid, s.username

    ORDER BY s.sid, s.username

    ;

    LISTAGG returns a VARCHAR2, which can contain up to 4000 characters.  If all the strings to combine are since long the entire 64 characters, so you can have as many 62 of them in each group.

  • Combination unrelated to SQL

    I found this code in knowledge Xpert:
    SELECT name
    FROM   emp
    WHERE  emp_no = 1234;
    SELECT name
    FROM   dpt
    WHERE  dpt_no = 10;
    SELECT  name
    FROM   cat
    WHERE  cat_type = 'RD'  ;
    and independent queries are combined like this to reduce network load by two thirds:
    SELECT E.name, D.name, C.name
    FROM   cat  C,
           dpt  D,
           emp  E,
           DUAL X
    WHERE  NVL('X', X.dummy) = NVL('X', E.rowid (+))
    AND    NVL('X', X.dummy) = NVL('X', D.rowid (+))
    AND    NVL('X', X.dummy) = NVL('X', C.rowid (+))
    AND    E.emp_no   (+)    = 1234
    AND    D.dept_no  (+)    = 10
    AND    C.cat_type (+)    = 'RD'
    But it must meet this condition: to combine all these separate queries in a SQL statement, you must perform an outer join on each table with a table that will still be valid (that is, one that will return at least one row).

    In the code of my project, where the customer's form of Oracle, I found lots of codes like that. Unfortunately, it may be a case where all may return no rows. So cannot satisfy the condition. Any idea? TX in advance.

    It's a stupid approach IMO.

    It does not violate the basic principles on the development (for example, the SQL logic) in order to meet a performance issue in something like the network.

    It's like using 2NF to reduce i/o. e.g. instead of reading a line of BILLS , then the content of the 20 line of INVOICE_LINES, it can be designed as a 2NF entity where all 20 invoice lines are stored with the invoice header. Now (in theory) means a single e/s to read a Bill instead of 1 + 20 e/s.

    But this approach has a serious impact on reports and processes and data integrity. How a SQL would look like to find all the Bills that sold Blue Widget object? Horrible awkward and complex and inefficient. This is why + 2NF-to-reduce-I / O + is not yet a review when designing databases RDBMS applications!

    IT MAKES NO SENSE TO VIOLATE THE BASIC PRINCIPLES OF ENGINEERING SOFTWARE TO ACCOUNT FOR PERFORMANCE!

    It's stupid. It's silly. The person or persons who have shared this as an approach valid software engineering on knowledge Xpert are... Well, I would fire a person like that. As I would be a person who has followed this stupid Council fire.

    You have a network performance problem? Then we'll talk about, how to solve the problems which and how to address this problem. Correctly. Without for as much abuse of the fundamental principles...

  • A map of OWB (service line) SQL query

    If I trace a session, run a map OWB (base line), the trace file contains the actual SQL query?

    The problem with me is that when I execute this rank - based OWB card, is throw me an error CursorFetchMapTerminationRTV20007, BUT (most time consuming) when I take on the intermediate SQL insert query, it works very well (and also in a very short time)

    The executing State = COMPLETE

    message = text ORA-06502: PL/SQL: digital or value error: character string buffer too small

    CursorFetchMapTerminationRTV20007 = message text

    N ° of task errors = 0

    N ° task warnings = 2

    N ° errors = 1

    Since this card OWB (truncate insert) is the line in function of where I can't back-end of the generated pl/sql package request OWB so I was wondering if I trace the session, check the trace file, maybe I'll able to see the exact SQL query generated. But I wanted to confirm the same.

    Yes, the real run SQL in session will be in the trace file.

  • Grouping of lines - SQL Developer

    I was wondering if someone can help me here - Im trying to group the lines in a "package" to get fewer lines of data and group together the dates where they follow (and they have the same class of service and client ID). Im not the most irritable person so any help is appreciated.

    Here's my CREATE & INSERT

    CREATE TABLE ACF_SERVICES_DIM (Client_id varchar2 (20),)
    Date of Agreement_Start_date,
    Date of Agreement_End_Date,
    Service_Category Varchar2 (200),
    Agreement_id varchar2 (20));

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2849', 'Red', TO_DATE (' 01/10/2013 ',' dd/mm/yyyy'), NULL);

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2279', 'Red', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2284', 'Red', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Commit;

    The last two are of the same exact service type / id / dates etc so id expect to see a result... I think however it it link to 1 also, such as tracking the dates on and again, everything else is the same.

    If there is a 4th line-

    VALUES ('2607 ', 'J2299', 'Blue', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Commit;

    I only expect to show also in a separate package because it does not match the 1st 3 because it is a different class of service, even if the dates are the same... I hope that helps?

    The request im trying to use is the following... HOWEVER it keeps giving me a not authorized windows error function

    WITH got_package_id AS

    (

    SELECT agreement_id

    MIN (CONNECT_BY_ROOT agreement_id) AS package_id

    Of acf_services_dim

    CONNECT BY NOCYCLE client_id = client_id PRIOR

    AND service_category = PRIOR service_category

    AND agreement_id <>agreement_id PRIOR

    AND (agreement_start_date = agreement_end_date FRONT + 1).

    OR agreement_end_date = PRIOR agreement_start_date - 1

    OR (agreement_start_date = PRIOR agreement_start_date

    AND agreement_end_date = PRIOR agreement_end_date

    )

    )

    GROUP BY agreement_id

    )

    SELECT s.Client_Id

    MIN (s.Agreement_Start_Date) AS package_start_date

    , NULLIF (NVL (MAX (s.Agreement_End_Date))

    DATE "9999-01-01'

    )

    DATE "9999-01-01'

    ) AS package_end_date

    s.Service_Category

    p.package_Id

    ROW_NUMBER () OVER (PARTITION BY s.client_id

    s.service_category

    ORDER BY p.package_id

    ) AS package_num - if wanted

    Of s acf_services_dim

    JOIN got_package_id p ON p.agreement_id = s.agreement_id

    GROUP BY s.client_id

    s.service_category

    p.package_id

    ;

    Don't know why, but im getting the following error when running in SQL developer... no idea why?

    Error in the command column line: 32:56

    Error report:

    SQL error: ORA-30483: window functions are not allowed here

    30483 00000 - "window functions are not allowed here."

    * Cause: Window functions are allowed only in the SELECT a query list.

    And, depending on the window cannot be an argument in another window or group

    function.

    * Action:

    Make a copy of your test case in a spreadsheet SQL Developer 4.0.3 connected to Oracle Xe (11.2.0.2) with jdk1.7.0_67 on Windows 7, everything works as expected:

    CLIENT_ID PACKAGE_START_DATE PACKAGE_END_DATE SERVICE_CATEGORY

    -------------------- ---------------------------------- ------------------------------- -------------------------------

    2607 1 March 02 13 - SEP - 30 Blue

    2607 1 March 02 13 - SEP - 30 Red

    No ORA-30483 at all.  What versions of SQL, Oracle DB, Java developer and so on are you using?

  • Command-line SQL appears then disappears

    I just installed the version 11g yesterday and I don't get a good start; can't run SQL command line.

    When I run the SQL command line (programs > Oracle Database 11g eXpress Edition > SQL command line) it appears for about a second then disappears
    SQL command line worked well during my first installation of Oracle Database 11 g eXpress Edition and I was able to connect as 'SYSTEM', but not after the reboot.

    Goes the same for the webpage to start; Now I get 'could not connect to 127.0.0.1:8080' when I go to programs > Oracle Database 11 g eXpress Edition > Get Started.
    Database of departure seems to work OK.

    When I run SQL * longer or Oracle SQL Developer, I get "ORA-12154: TNS: could not resolve the connect identifier specified" so this isn't really an option right now.

    Any thoughts on how to get the SQL command line work? Operating system is Windows XP, 32-bit.

    OracleServiceXE Windows service is started?

    From the command prompt:

    sqlplus / as sysdba

    SQL > startup

  • Try to combine two "lines" to make a "shape"?

    I tried for hours to combine two curves I draw with the pencil tool in the form of what I can fill it with a color or a gradient:

    http://img199.imageshack.us/img199/4155/flametests01.PNG

    The top row has two lines (rubbed).   When I move them around together, I get a nice shape "flame" I want to use a logo.

    The low line shows what happens when the two 'lines' are 'filled', and what happens when the flame is "completed".   I tried all manor of consolidation, merger, combining... I lost track at this point...

    I think part of my problem is that I guess would be the pencil tool to draw lines (or 'ways' are perhaps more accurate?) - but it seems to be 'forms '.

    I tried to use the pen tool, but the curves are never as smooth as those that I drew "Freehand"...

    What should I do / do differently?

    Just drag - select two higher points with the direct Selection tool and KBSC CmdOpt-shift-J allows to unite lines. Do the same thing at the bottom to fill the shape.

  • line SQL of a package

    Hope you guys can help me with something;
    I want to see the objects used by a package,
    and the objects that use these objects

    In other words:
    I want to have all the objects and the child objects that make the use of a package
    So, if I want to have a package of SITE I want to display all of the tables, views, and other packages that are used in the package Web site,
    and train all these views / tables and packages all of the child objects that make use of these table / view (s) and packages.

    I thought that the connection by doing it for me, as below, but it takes to always load; I think that it is in a loop.
    How did you guys would solve this one?
    That's what I have so far:

    Select * from dba_dependencies where name = 'WEB Site'
    and referenced_type! = "DOES NOT EXIST".
    and referenced_owner! = 'SYS '.
    and referenced_type! = "SYNONYM".
    and owner. name! = referenced_owner | referenced_name
    connect by owner | name = referenced_owner | referenced_name;

    Try to use the parameter nocycle to connect by clause. It will allow your sql finish and you can also use the nickname column CONNECT_BY_ISCYCLE to know what is cyclical.

    Documents of 10g:
    CONNECTION BY specifies the relationship between the parent and children lines of the hierarchy.

    *

    The NOCYCLE parameter tells Oracle database to return a query lines, even though a CONNECTION IN LOOP exists in the data. Use this parameter with the username CONNECT_BY_ISCYCLE to see which lines contain the loop. For more information, see virtual CONNECT_BY_ISCYCLE.

    Also just to note, this will find hard dependencies, but won't find dependencies dynamic sql and plsql.

  • Combine multiple lines in a single line

    Hello

    I want the output of several data of line in a row.

    I try to display the supervisor of people and their supervisors and so on. I am able to display the Level1 supervisor and not able to display the next level.

    Here is the code:

    
    
    

    with

    Nobody like

    (select person_id 100299, employee_name 'VELASCO, OMAR' Union double all the)

    58293, select "UREÑA, PABLO" Union double all the

    Select 98539, 'USLENGHI, MATIAS slimani' Union double all the

    Select 68240, "Slimani, Mr. Vrishal A" Union double all the

    Select 72230, 'Harvey, Mr. Darin S' Union double all the

    Select 76200, 'CLARK, TIM MIDDLE EAST' of all the double union

    Select 67819, "BOEHLER, JEFF a." everything double union

    29202, select "FRADIN, ROGER" the double

    ),

    master_slave as

    (select 100299 slave, master 58293 Union double all the)

    Select 58293,98539 from all the double union

    Select 98539,68240 from all the double union

    Select 68240,72230 from all the double union

    Select 72230,76200 from all the double union

    Select 76200,67819 from all the double union

    Select 67819,29202 from all the double union

    Select 29202, the double null

    ),

    hierarchy as

    (select level lvl, sys_connect_by_path(slave,'|') path, max (level) on max_level)

    of master_slave

    where connect_by_isleaf = 1

    connect by slave = master prior

    ),

    Splitter (LVL, person_id, supervisor_1, supervisor_2, path) as

    (select lvl,

    regexp_substr (path '(\ |) [ ^|] +)', 1, 1, null, 1).

    regexp_substr (path '(\ |) [ ^|] +)', 1, 2, null, 1).

    regexp_substr (path '(\ |) [ ^|] +)', 1, 3, null, 1).

    regexp_replace (path,'^-|) [ ^|] +')

    of the hierarchy

    where lvl = max_level

    Union of all the

    Select lvl,

    regexp_substr (path '(\ |) [ ^|] +)', 1, 1, null, 1).

    regexp_substr (path '(\ |) [ ^|] +)', 1, 2, null, 1).

    regexp_substr (path '(\ |) [ ^|] +)', 1, 3, null, 1).

    regexp_replace (path,'^-|) [ ^|] +')

    between the separator

    where path is not null

    )

    Select person_id, to_number (ltrim(s.person_id,'|')),

    (select employee_name from person where person_id = to_number (ltrim(s.person_id,'|'))) employee_name,

    (select employee_name from person where person_id = to_number (ltrim(s.supervisor_1,'|'))) supervisor_1,

    (select employee_name from person where person_id = to_number (ltrim(s.supervisor_2,'|'))) supervisor_2

    s separator

    where s.person_id is not null

    order by length (s.path) desc nulls last

    PERSON_ID Employee_name SUPERVISOR_1 SUPERVISOR_2
    100299 VELASCO, OMAR UREÑA, PABLO USLENGHI, MATIAS slimani
    58293 UREÑA, PABLO USLENGHI, MATIAS slimani Slimani, Mr. Vrishal A
    98539 USLENGHI, MATIAS slimani Slimani, Mr. Vrishal A Harvey, Mr. Darin S
    68240 Slimani, Mr. Vrishal A Harvey, Mr. Darin S CLARK, TIM MIDDLE EAST
    72230 Harvey, Mr. Darin S CLARK, TIM MIDDLE EAST BOEHLER, JEFF HAS
    76200 CLARK, TIM MIDDLE EAST BOEHLER, JEFF HAS FRADIN, ROGER
    67819 BOEHLER, JEFF HAS FRADIN, ROGER -
    29202 FRADIN, ROGER - -

    Concerning

    Adrien

  • How can I combine 2 pl/sql xml documents

    Hello

    We are generating a report with DBMS_XMLGEN. The report is too large and the selection is very heavy. Don't want to use dynamic SQL statements. I am trying to break the queries and generate xml data, and then add the docs together. Is there a way we can add an xml document to another?

    Thank you for your help in advance.

    I plan to write queries (10 queries) in this case and generate XML fragments and inserted into a temporary table and then concatenate them.

    In this case, you will need the aggregation in the rows XMLAgg function, don't not XMLConcat.

Maybe you are looking for

  • MasterCook11

    a Crash when clicking on the tabs when editing a recipe. (Windows XP)If you click on management, Notes, categories, ideas that serves, time, Infoand Nutrition tabs when you change a recipe that MasterCook will crash. This questiononly appears when yo

  • Update failed error Windows Vista 80070057

    Hi ....... The error code that is coming is 80070057.  I ran the fix with no changes, I ran scannow sfc and when he got to the 30% full it failed and no end not (method 2).  I ran the disk check, and it gave rise to no error. I followed the suggestio

  • How to change the location of the offline files folder?

    I would like to use offline files, but all of my offline files are stored on my main partition of hard local. In Sync Center, I can only manage the size of offline files folder, but not the location. Is it possible to change the location of the folde

  • How do I remove or hide the images

    How can we remove or hide the image

  • Windows experience index will not refresh

    I just installed 64-bit Windows 7 Professional (32 bit Home Premium) with a custom installation. I use aero, so when I went to check my Windows Experience index, I saw that it was 1.0 for both the graphics settings. I've updated my restarted graphics