Query IDS4215-CSA-BUN-K9

Hello

Is the VMS in BASIC that comes with IDS4215-CSA-BUN-K9 threat prevention Starter Kit capable of simultaneously supporting the alarm monitoring/management of a 4215 and an AP?

Is all cela I need to set up a single 4215 and a CSA on an exchange server?

Sorry, but I just want to be sure. Am new in this field.

Thank you very much

I don't know that this is sufficient for the monitoring and management of the hardware ID & HIDS. This will have the IDSMC &™ incorporated, which can be used to configure a system IDS 4215 & CSA. You can have the surveillance done from the security of virtual machine monitor.

I think it comes with 10 licenses of CSA.

more details on the bundle can be seen from the following URL:

http://www.Cisco.com/application/PDF/en/us/guest/products/ps5367/c1625/cdccont_0900aecd800f9565.PDF

Tags: Cisco Security

Similar Questions

  • Need help with a query result

    Oracle Version: 11.2.0.2.0

    I need assistance with the output of the query. Here is the table.

    With Tbl_Nm as

    (

    Select 'ABC1' SYSTEM_ID, REGION 'US', 'CHI' SUB_REGION 4000 BALANCE, to_date('1-JUN-2012 10:45:00 am', 'dd-mon-yyyy hh:mi:ss am') LAST_UPD_TIME, 'A' FLAG of union double all the

    Select 'PQR2', 'UK', 'LN', 2000, To_Date('1-JUL-2012 10:46:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' starting from dual Union All

    Select 'ABC1', 'IND","MAMA", 3500, To_Date('1-AUG-2012 11:47:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select "LMN3", "US", "NJ", 2500, To_Date('1-SEP-2012 09:49:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select "PQR2", "UK", "MC", 2600, To_Date('1-OCT-2012 04:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select 'ABC1', 'US', 'NY', 3200, To_Date('1-OCT-2012 06:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' starting from dual Union All

    Select "LMN3", "UK", "BT", 2400, To_Date('1-NOV-2012 07:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' From Dual

    )

    Select * from tbl_nm

    I need the output below.

    PQR2 UK MC 2600 1 OCTOBER 2012 04:45

    ABC1 US NY 3500 October 1, 2012 06:45

    LMN3 UK BT 2500 November 1, 2012 07:45

    The need the disc according to this system_id flagged as "A". But if the last disc of 'd' then it must show that the amount, but the file should be displayed in 'A '.

    I've tried a few and got stuck. Help, please. Not able to get a balance '.

    This question is a bit similar to needing help with a query result

    With Tbl_Nm as

    (

    Select 'ABC1' System_Id, region 'US', 'CHI' Sub_Region, 4000 balance, To_Date('1-JUN-2012 10:45:00 am', 'dd-mon-yyyy hh:mi:ss am') Last_Upd_Time, 'A' flag of double Union All

    Select 'PQR2', 'UK', 'LN', 2000, To_Date('1-JUL-2012 10:46:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' starting from dual Union All

    Select 'ABC1', 'IND","MAMA", 3500, To_Date('1-AUG-2012 11:47:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select "LMN3", "US", "NJ", 2500, To_Date('1-SEP-2012 09:49:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select "PQR2", "UK", "MC", 2600, To_Date('1-OCT-2012 04:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), 'A' from dual Union All

    Select 'ABC1', 'US', 'NY', 3200, To_Date('1-OCT-2012 06:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' starting from dual Union All

    Select "LMN3", "UK", "BT", 2400, To_Date('1-NOV-2012 07:45:00 am', 'dd-mon-yyyy hh:mi:ss am'), has ' From Dual

    )

    Select System_Id, region, Sub_Region, Balance, Last_Upd_Time of Tbl_Nm T1

    where t1. Last_Upd_Time = (select max (Last_Upd_Time) in the Tbl_Nm T2 where T1.) SYSTEM_ID = T2. SYSTEM_ID)

    So maybe you'd then

    ORDER BY DECODE(flag,'D',9,1) ASC...

    to get the Ds at the end of the list.

    or

    ORDER BY CASE WHAT flag = has ' (your other filters) AND then 9 or 1 end CSA,...

    HTH

  • using the syntax of query expdp

    Hi I need to export a table in this query, could someone help me with the syntax?

    SELECT *.

    FROM (select * from table ORDER BY table_id CSA) table

    WHERE rownum < = 5

    ORDER BY ASC rownum;

    Thank you

    Hello

    You need to do something like that - if necessary, replace the table/column names

    expdp username/password parfile = rich.par

    Rich.par must contain

    include = TABLE: ' = 'YOUR_TABLE_NAME»'

    Query = "where column_name in (select column to (select col_name, row_number () (any order by column_name ASC) the form your_table_name x) where x)"<>

    See you soon,.

    Rich

  • Query reporting


    Hello

    I use OBIEE 11.1.1.6.6.I have as guest

    Date between: from and to

    Country: USA, UK, IN...

    Client: NAABB

    Now could you please let me know how can I generate report from sub queries

    -The host request-

    SELECT count (*), RECEIVER_Cty_code of AAAAAAAA

    "' where business_date > = 20 June 2013 ' and business_date < = 25 June 2013.

    and MSG_IN_OUT_IND = 'SEND '.

    and MSG_TYPE_CODE = '103 '.

    and SENDER_Cty_code = 'En' (country prompt value)

    and ADDL_REF_NO (sub ADDL_REF_NO query values)

    RECEIVER_Cty_code group

    order by 1 desc

    -Void query-

    Select distinct ADDL_REF_NO from AAAAAAAA

    "' where business_date > = 20 June 2013 ' and business_date < = 25 July 2013."

    and MSG_IN_OUT_IND = 'RECEIVE. '

    and MSG_TYPE_CODE = '103 '.

    and RECEIVER_Cty_code = 'En' (country prompt value)

    and sender_Code = 'NAABB' (guest customer value)

    order of the CSA 1

    Could if it you please let me know how I can create report. First of all, I must select guest after that my sub query will run and get values.

    Based on the values of query sub that I have to go to the main request. Main request. Give me the steps

    Thank you

    Gram

    Hello

    After setting the filter based on another analysis (query sub report) save the report and place them in the dashboard in the same way as the other reports.

    create new section in the main report and make the report in section properties and query sub under type CSS Display: None. so that this report does not appear in the dashboard, but what ever the values you select in the guest of will reflected in the request from sub report reflected in the main report.

    Note: Do not forget to protect the sub query report filter.

    Select this option if useful/correct.

    Thank you.

  • Sub query with order of

    Hello


    I created a sub with sorting on a column request. (I have cutomized the IKM control append for order). I see the order by the State. If I use this (interface yellow) subquery in the main query (is also yellow interface) I do not see the order of condition


    Subquery (Q-yellow interface):

    Select

    NEST,
    START_TIME,
    ACTION_TYPE_CODE


    Of

    (




    SELECT DISTINCT
    SERVICE_TRACKING_S.PID PID,
    START_TIME TO_TIMESTAMP (TO_CHAR (SERVICE_TRACKING_S.ACTION_TIME, 'DD-MON-YY HH24:MI:SS'), "MON-DD-YY HH24:MI:SS"),
    SERVICE_TRACKING_S.ACTION_TYPE_CODE ACTION_TYPE_CODE
    of KSTGDB. SERVICE_TRACKING_S SERVICE_TRACKING_S

    where (1 = 1)

    ORDER BY-----------------------------------------------
    NEST
    START_TIME CSA


    )

    ODI_GET_FROM

    Main query (Q1 - yellow interface):

    Select
    NEST,
    START_TIME,
    ACTION_TYPE_CODE,
    RN,
    RN_MAX

    CEN


    Select
    Q.PID PID,
    Q.START_TIME START_TIME,
    WHEN Q.START_TIME - LAG(Q.START_TIME,1,Q.START_TIME) CASE above (PARTITION OF Q. PID ORDER OF Q.START_TIME) > numtodsinterval(75,'minute')
    or Q.PID! = LAG (Q.PID, 1, 0) ON (Q.PID ORDER OF Q.START_TIME PARTITION) THEN 1 OTHER Q.ACTION_TYPE_CODE END ACTION_TYPE_CODE.
    ROW_NUMBER() OVER(PARTITION BY Q.PID ORDER BY Q.START_TIME) RN,
    Count (*) over (PARTITION OF Q.PID ORDER OF Q.START_TIME LINES BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
    RN_MAX
    de)

    SELECT DISTINCT
    SERVICE_TRACKING_S.PID PID, START_TIME TO_TIMESTAMP (TO_CHAR (SERVICE_TRACKING_S.ACTION_TIME, 'DD-MON-YY HH24:MI:SS'), "MON-DD-YY HH24:MI:SS"), SERVICE_TRACKING_S.ACTION_TYPE_CODE ACTION_TYPE_CODE
    of KSTGDB. SERVICE_TRACKING_S SERVICE_TRACKING_S
    where (1 = 1)

    -I don't get stopped by here-
    ) Q
    where (1 = 1)
    ) ODI_GET_FROM

    Thanks in advance

    K

    Hello

    what you trying to do? A decree by a subselect in the useless statement.

    Also use an order you need to add an option and change the IKM

  • Maximum Date of Oracle query

    I need help in creating a query

    Select a.job_number, a.title, a.request_date, a.completion_date, b.modification_number, b.actual_cost, b.shop_facility_percentage, d.status_date
    Of
    survey_jobs one
    outer join left survey_job_bundles b
    on (a.survey_job_id = b.survey_job_id)
    Join external survey_job_status d on left (b.survey_job_bundle_id = d.survey_job_bundle_id)
    order of a.job_number CSA, CSA b.modification_number

    This query generates a report which duplicates some lines. It does because I join a child at the table who has a to-many with its parent. The child table can have many dates (d.status_date). I want to get the maximum date of the child table. I created a function max that I tried to plug it, but when I plug it right under the last outer join, it reduces my results to report.


    Here is my attempt at office max

    AND b.SURVEY_JOB_BUNDLE_ID = d.SURVEY_JOB_BUNDLE_ID
    AND ((d.SURVEY_JOB_BUNDLE_ID IS NULL) OR)
    (d.SURVEY_JOB_BUNDLE_ID, d.STATUS_DATE) IN
    (SELECT SURVEY_JOB_BUNDLE_ID, MAX (STATUS_DATE) OF)
    SURVEY_JOB_STATUS OF SURVEY_JOB_BUNDLE_ID GROUP))


    Can someone help me with this? Thanks in advance

    Published by: 963510 on January 9, 2013 11:17

    Published by: 963510 on January 9, 2013 11:22

    Published by: 963510 on January 9, 2013 11:23

    A solution could be...

    select a.job_number,
           a.title,
           a.request_date,
           a.completion_date,
           b.modification_number,
           b.actual_cost,
           b.shop_facility_percentage,
           ( select max(d.status_date)
               from survey_job_status d
              where b.survey_job_bundle_id = d.survey_job_bundle_id
           ) status_date
      from survey_jobs a
      left outer join survey_job_bundles b on (a.survey_job_id = b.survey_job_id)
     order by a.job_number asc,
              b.modification_number asc
    

    / Kenny

  • Build SQL query

    Hello

    I have the following query, which returns the active requests created and closed per year. The question is that I need to accumulate the active requests last year to next year, created, in the end, the assets must be 0. Can anyone help?

    Query:

    SELECT ANO, ABERTOS AS ABERTOS, ONLY, ACTIVOS
    Of
    (SELECT NEW. ANO AS ANO, ABERTOS, ONLY, ABERTOS-ONLY AS ACTIVOS
    (SELECT CAL. AS ANO ANO, / * CRIAÇÃO. KEY_CATALOGO, * / COUNT (*) AS ABERTOS
    of dm_facto_t CRIAÇÃO
    LEFT JOIN DIM_CALENDARIO_T CAL
    ON CRIAÇÃO. KEY_CALENDARIO = CAL. KEY_CALENDARIO
    where key_tipo_facto = 17
    GROUP OF CAL. -ANO, CRIAÇÃO. KEY_CATALOGO
    ORDER BY CAL. NEW YEAR CSA)
    LEFT JOIN)
    SELECT CAL. ANO, / * FECHO. KEY_CATALOGO, * / COUNT (*) AS ONLY
    of dm_facto_t FECHO
    LEFT JOIN DIM_CALENDARIO_T CAL
    ON FECHO. KEY_CALENDARIO = CAL. KEY_CALENDARIO
    where key_tipo_facto = 18
    GROUP OF CAL. -ANO, FECHO. KEY_CATALOGO
    ORDER BY CAL. FECHOS ANO CSA)
    ON NEW. ANO = FECHOS. ANO);

    Result


    Year active closed established
    2008 1477 1452 25
    2009 1933 1684 249
    4270 4187 2010 - 83
    4086 3895 2011 - 191

    Thank you!
    with t as ( select 2008 yr, 25 active from dual union all
                    select 2009, 249 from dual union all
                    select 2010, -83 from dual union all
                    select 2011, -191 from dual )
      select t.*, sum(active) over (order by yr) running_total  from t
    
    YR     ACTIVE     RUNNING_TOTAL
    2008     25     25
    2009     249     274
    2010     -83     191
    2011     -191     0
    
  • Error when running query ORA-00932

    Hi I have the following query and its giving error solve it please...

    SELECT DISTINCT acthed, rcptno, depdate, matdate, depamt, service rate, intaccd, intpaid, intpble, paytfreq, instalamt, autrenfg,
    curbalnc, curbdrcr, clrbalnc, clrbdrcr, acstatus, lnachd, lnacno, siflag, siacthed, siactnum, catgcode, lastitcal,
    tdsflag, tdsamt, tdsdate, tdsint, actnum FROM tdmaster WHERE acstatus = 1
    AND fundstat = 'Y' AND acthed = 4016
    AND depdate < to_number (trunc('30-SEP-2011','mm') + 22) //Error here.
    AND ((lastitcal) < 30-SEP-2011' or lastitcal is null)
    ORDER BY depdate CSA;

    Please send the executable query...

    Thanks in advance...

    Hi user11384749,

    If the depdate column have the date data type you can use the to_date function to convert the text to a date then make addition inside:

    depdate< (to_date('30-sep-2011','dd-mm-yyyy')="" +="">

    This will allow to compare the depdate dated October 22, 11

    I hope that this will be your answer

    Kind regards

    M.A.Bamboat

  • Query for the weekly report

    Hello
    I wrote a query to get a weekly report, which is expected to start a week from Sunday to Saturday typical. for example, the week is 03/04/2011 to 04/09/2011 I run the query or the task on Word to say about any of the week of 10/04/2011, 04.11.2011 etc... Here's my query, but it seems to work of the sysdate to-7 days that does not receive the Sunday to Sam requirement... someone can you please...

    Select uid, psn, TO_char(date_in,'mm/dd/yyyy')
    OF THE TEST
    WHERE the uid like '% % ST.
    and date_in > trunc (sysdate)-7
    ORDER BY date_in CSA;
    Thank you.

    If you want that data for the week previous ? In if so then just tweak the settings a bit:

    SELECT uid
         , psn
         , TO_char(date_in,'mm/dd/yyyy')
    FROM   test
    WHERE  uid LIKE '%ST%'
    AND    date_in >= TRUNC(SYSDATE,'IW') - 8
    AND    date_in < TRUNC(SYSDATE,'IW') - 1
    ORDER BY date_in ASC
    ;
    
  • The search syntax of SQL query against the data type varchar2 preserving valid data.

    Have a data model that we are not allowed to change and the column in question is a varchar2 (20). The column has at this stage no foreign key to the list of valid values. So, until we can get those who control the data model in order to make the adjustments we need for a SQL query that root out us bad data on the hours fixed.

    Is what we expect to be good data below:

    -Whole number, without floating point
    -Length of 5 or less (greater than zero but less than 99999)
    -Text "No_RP" can exist.

    Request demo below works most of the time with the exception of 'or Column1 is null' is not contagious in the null record. I tried to change the logical terms around, but did not understand the correct layout still provide it. So help would be greatly appreciated it someone could put me straight on how to properly register a null value in the recordset that has been selected with other types of error for end users to correct their mistakes. Another thing, I suppose there could be a better approach syntactically to a call find all offender characters such as *, &, (and so on.)

    WITH Sample_Data AS (SELECT '0' collar OF DOUBLE UNION ALL)
    SELECT "2" collar OF DOUBLE UNION ALL
    SELECT "99999" col OF DOUBLE UNION ALL
    SELECT "100000" col OF DOUBLE UNION ALL
    SELECT '1 a' collar OF DOUBLE UNION ALL
    SELECT the "ABCD" OF DOUBLE UNION ALL pass
    SELECT 'A1' collar OF DOUBLE UNION ALL
    SELECT ' *' collar OF DOUBLE UNION ALL
    SELECT "/" pass OF DOUBLE UNION ALL
    SELECT '-' col OF DOUBLE UNION ALL
    SELECT ' ' collar OF DOUBLE UNION ALL
    SELECT "pass OF DOUBLE UNION ALL
    4. SELECT 5 6' collar OF DOUBLE UNION ALL
    SELECT "24.5" collar OF DOUBLE UNION ALL
    SELECT '-3' collar OF DOUBLE UNION ALL.
    SELECT 'A' collar OF DOUBLE UNION ALL
    SELECT 'F' OF DOUBLE UNION ALL cervical
    SELECT the 'Z' OF DOUBLE UNION ALL pass
    SELECT the pass 'Bye' FROM DUAL UNION ALL
    SELECT the "Hello World" OF DOUBLE UNION ALL pass
    SELECT "=" col OF DOUBLE UNION ALL
    SELECT "+" col OF DOUBLE UNION ALL
    SELECT '_' pass OF DOUBLE UNION ALL
    SELECT '-' col OF DOUBLE UNION ALL
    SELECT ' (' col OF DOUBLE UNION ALL)
    SELECT ')' collar OF DOUBLE UNION ALL
    SELECT '&' collar OF DOUBLE UNION ALL
    SELECT ' ^' collar OF DOUBLE UNION ALL
    SELECT '%' collar OF DOUBLE UNION ALL
    SELECT the pass of "$" OF DOUBLE UNION ALL
    SELECT the pass ' # ' TO DOUBLE UNION ALL
    SELECT ' @' collar OF DOUBLE UNION ALL
    SELECT '!' collar OF DOUBLE UNION ALL
    SELECT ' ~' collar OF DOUBLE UNION ALL
    SELECT "' collar OF DOUBLE UNION ALL
    SELECT '.' pass FROM DUAL
    )
    SELECT col from Sample_data
    WHERE (translate (col, '_0123456789', '_') is not null
    or length (col) > 5
    col = 0 or
    or col is null)
    and (upper (col) <>'NO_RP');

    One more thing, I also took the approach of the regular expression, but he could not understand. If anyone knows how to do with this approach, I would also appreciate learning this method as well. Below is a close because I had. Impossible to get a range to work as "between 0 and 100000", guessing because of the comparison of varchar2 and # even attempted using to_char and to_number.

    Select to_number (column1) from the testsql where REGEXP_LIKE (column1, ' ^ [[: digit:]] + $') ORDER BY to_number (column1) CSA;

    Thanks in advance for anyone to help.

    Nick

    Hello

    Thanks for posting the sample data in a useable form.
    It would be useful that you also posted the accurate results you wanted from this data. You want the same results as those produced by the query you posted, except that nulls should be included? If so:

    SELECT     col
    FROM     sample_data
    WHERE     CASE
             WHEN  UPPER (col) = 'NO_RP'               THEN  1
             WHEN  col IS NULL                    THEN -1
             WHEN  LTRIM (col, '0123456789') IS NOT NULL     THEN -2
             WHEN  LENGTH (col) > 5               THEN -3
                                           ELSE TO_NUMBER (col)
         END     NOT BETWEEN     1
                  AND          99999
    ;
    

    The requirement that pass! = 0 gives that much more difficult. You could test easily for an integer from 1 to 5 digits, but then you must have a separate condition to make sure that the chain was not '0', '00', '000', ' 0000 'or ' 00000'.
    (Unlike Solomon, I guess that do not want to choose no-0 numbers starting by 0, such as ' 007 'or ' 02138'.)

    Using regular expressions, you may lose a few keystrokes, but you also lose a lot of clarity:

    SELECT     col
    FROM     sample_data
    WHERE     REGEXP_LIKE ( col
                  , '^0{1,5}$'
                  )
    OR NOT     REGEXP_LIKE ( NVL ( UPPER (col)
                     , 'BAD'
                     )
                  , '^(([1-9][0-9]{0,4})|NO_RP)$'
                  )
    ;
    

    Published by: Frank Kulash, December 13, 2010 21:50

    Published by: Frank Kulash, December 13, 2010 22:11
    Added regular expression solution

  • Hierarchical + analysis of query for the parameters of the OU

    Hello gurus,

    I'm trying for a couple of hours there is a query works as I want.

    Our application needs to store settings for our organizational units. These organizational units are generally organized in a hierarchy manner: a high-level unit many units of the child. The settings are stored in another table with 1:1 relationship.

    For ease of visualization, here are the data of the organization unit and parameter table in a more visual format:
    SQL> select * from organization_unit;
    UNIT_CODE  UNIT_NAME            PARENT_UNIT_CODE
    ---------- -------------------- ----------------
    00000      Top level
    10         L2 unit #10          00000
    10-01      L3 unit #10-01       10
    10-02      L3 unit #10-02       10
    20         L2 unit #20          00000
    20-01      L3 unit #20-01       20
    20-02      L3 unit #20-02       20
    
    SQL>  select * from org_unit_parameters;
    UNIT_CODE  PARAM1               PARAM2               PARAM3               PARAM4
    ---------- -------------------- -------------------- -------------------- --------------------
    00000      Default value        Default value        Default value        {null}
    10         {null}               Value from 10        Value from 10        {null}
    10-01      {null}               {null}               Value from 10-01     {null}
    10-02      {null}               {null}               {null}               Value from 10-02
    20         Value from 20        Value from 20        Value from 20        {null}
    20-01      {null}               Value from 20-01     {null}               {null}
    20-02      {null}               Value from 20-02     {null}               {null}
    The application queries the table of parameters to get a parameter value for a given unit.
    The parameter resolution algorithm is pretty simple: when you query a unit, the applicable parameter is set to the required level. If the parameter is undefined (null) to the required level, the value of the parameter to be returned is defined next in the hierarchy parent. In some rare cases, it can be null if a parameter is not set anywhere from required at the top level.

    I made a request that seems to work when querying a unit at a time. It uses hierarchical operators (start by + connect by) with a bit of analytical functions. Here's a test & the raw output example:
    SQL> WITH hierarchy
      2  AS
      3  (
      4    SELECT ou.unit_code,
      5         LEVEL            AS lvl
      6    FROM   organization_unit ou
      7    START WITH
      8      ou.unit_code = '20-01'
      9    CONNECT BY
     10      ou.unit_code = PRIOR ou.parent_unit_code
     11  )
     12  SELECT h.*,
     13       p.param1                                                        AS param1_raw,
     14       LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param1_with_last,
     15       FIRST_VALUE(p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param1_with_first,
     16       p.param2                                                        AS param2_raw,
     17       LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param2_with_last,
     18       FIRST_VALUE(p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param2_with_first,
     19       p.param3                                                        AS param3_raw,
     20       LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param3_with_last,
     21       FIRST_VALUE(p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param3_with_first,
     22       p.param4                                                        AS param4_raw,
     23       LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param4_with_last,
     24       FIRST_VALUE(p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param4_with_first
     25  FROM   hierarchy                                h
     26         LEFT JOIN org_unit_parameters         p
     27         ON h.unit_code = p.unit_code
     28  ORDER BY h.lvl DESC;
    
    UNIT_CODE   LVL PARAM1_RAW           PARAM1_WITH_LAST     PARAM1_WITH_FIRST    PARAM2_RAW           PARAM2_WITH_LAST     PARAM2_WITH_FIRST    PARAM3_RAW           PARAM3_WITH_LAST     PARAM3_WITH_FIRST    PARAM4_RAW           PARAM4_WITH_LAST     PARAM4_WITH_FIRST
    ---------- ---- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- -------------------- --------------------
    00000         3 Default value        Default value        Value from 20        Default value        Default value        Value from 20-01     Default value        Default value        Value from 20        {null}               {null}               {null}
    20            2 Value from 20        Value from 20        Value from 20        Value from 20        Value from 20        Value from 20-01     Value from 20        Value from 20        Value from 20        {null}               {null}               {null}
    20-01         1 {null}               Value from 20        {null}               Value from 20-01     Value from 20-01     Value from 20-01     {null}               Value from 20        {null}               {null}               {null}               {null}
    Seems pretty good, higher settings are well "propagated" down with the LAST_VALUE function. But, I don't understand why the use of FIRST_VALUE and oppposite command does not give the same result. A little more play with the last query to get the final result of a given unit code:
    SQL> SELECT *
      2  FROM
      3  (
      4     WITH hierarchy
      5     AS
      6     (
      7        SELECT ou.unit_code,
      8               LEVEL            AS lvl
      9        FROM   organization_unit ou
     10        START WITH
     11           ou.unit_code = '20-01'
     12        CONNECT BY
     13           ou.unit_code = PRIOR ou.parent_unit_code
     14     )
     15     SELECT h.*,
     16            LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param1,
     17            LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param2,
     18            LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param3,
     19            LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param4
     20     FROM   hierarchy                                h
     21               LEFT JOIN org_unit_parameters         p
     22               ON h.unit_code = p.unit_code
     23     ORDER BY h.lvl
     24  )
     25  WHERE ROWNUM = 1;
    
    UNIT_CODE   LVL PARAM1               PARAM2               PARAM3               PARAM4
    ---------- ---- -------------------- -------------------- -------------------- --------------------
    20-01         1 Value from 20        Value from 20-01     Value from 20        {null}
    Works well!

    But my ultimate goal is to create a view that properly solve all these parameters for each level of the organization with the good spread rather in new queries for each unit at once. I played a little, but without success. :( My current gross query is the following:
    SQL> WITH hierarchy
      2  AS
      3  (
      4     SELECT ou.unit_code,
      5            LPAD(' ',2*(LEVEL-1)) || ou.unit_code    AS tree,
      6            LEVEL                                    AS lvl
      7     FROM   organization_unit ou
      8     START WITH
      9        parent_unit_code IS NULL
     10     CONNECT BY
     11        PRIOR unit_code =  parent_unit_code
     12  )
     13  SELECT h.*,
     14         p.param1                                                        AS param1_raw,
     15         LAST_VALUE (p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param1_with_last,
     16         FIRST_VALUE(p.param1 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param1_with_first,
     17         p.param2                                                        AS param2_raw,
     18         LAST_VALUE (p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param2_with_last,
     19         FIRST_VALUE(p.param2 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param2_with_first,
     20         p.param3                                                        AS param3_raw,
     21         LAST_VALUE (p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param3_with_last,
     22         FIRST_VALUE(p.param3 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param3_with_first,
     23         p.param4                                                        AS param4_raw,
     24         LAST_VALUE (p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl DESC)   AS param4_with_last,
     25         FIRST_VALUE(p.param4 IGNORE NULLS) OVER (ORDER BY h.lvl ASC)    AS param4_with_first
     26  FROM   hierarchy                          h
     27            LEFT JOIN org_unit_parameters   p
     28            ON h.unit_code = p.unit_code
     29  ORDER BY h.unit_code;
    
    UNIT_CODE  TREE        LVL PARAM1_RAW                PARAM1_WITH_LAST          PARAM1_WITH_FIRST      PARAM2_RAW                   PARAM2_WITH_LAST          PARAM2_WITH_FIRST         PARAM3_RAW                PARAM3_WITH_LAST          PARAM3_WITH_FIRST         PARAM4_RAW                PARAM4_WITH_LAST       PARAM4_WITH_FIRST
    ---------- ---------- ---- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- ------------------------- -------------------------
    00000      00000         1 Default value             Default value             Default value          Default value                Default value             Default value             Default value             Default value             Default value             {null}                    Value from 10-02       {null}
    10           10          2 {null}                    Value from 20             Default value          Value from 10                Value from 10             Default value             Value from 10             Value from 10             Default value             {null}                    Value from 10-02       {null}
    10-01          10-01     3 {null}                    {null}                    Default value          {null}                       Value from 20-02          Default value             Value from 10-01          Value from 10-01          Default value             {null}                    Value from 10-02       Value from 10-02
    10-02          10-02     3 {null}                    {null}                    Default value          {null}                       Value from 20-02          Default value             {null}                    Value from 10-01          Default value             Value from 10-02          Value from 10-02       Value from 10-02
    20           20          2 Value from 20             Value from 20             Default value          Value from 20                Value from 10             Default value             Value from 20             Value from 10             Default value             {null}                    Value from 10-02       {null}
    20-01          20-01     3 {null}                    {null}                    Default value          Value from 20-01             Value from 20-02          Default value             {null}                    Value from 10-01          Default value             {null}                    Value from 10-02       Value from 10-02
    20-02          20-02     3 {null}                    {null}                    Default value          Value from 20-02             Value from 20-02          Default value             {null}                    Value from 10-01          Default value             {null}                    Value from 10-02       Value from 10-02
    As you can see, it's not that I was expecting. I know there is something to do with a PARTITION BY clause, but do not know how.
    Anyone know how to solve my problem?

    Thank you
    Bruno

    For the purposes of reproducibility, here is the code to create the structure and data:
    Here is the format of my paintings and a few samble data:
    CREATE TABLE organization_unit (
       unit_code         VARCHAR2(5 CHAR)   NOT NULL PRIMARY KEY,
       unit_name         VARCHAR2(100 CHAR) NOT NULL,
       parent_unit_code  VARCHAR2(5 CHAR)   
    );
    
    CREATE TABLE org_unit_parameters (
       unit_code         VARCHAR2(5 CHAR)   NOT NULL PRIMARY KEY,
       param1            VARCHAR2(100 CHAR),
       param2            VARCHAR2(100 CHAR),
       param3            VARCHAR2(100 CHAR),
       param4            VARCHAR2(100 CHAR)
    );
    
    -- Inserting data
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('00000', 'Top level', NULL);
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('10', 'L2 unit #10', '00000');
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('10-01', 'L3 unit #10-01', '10');
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('10-02', 'L3 unit #10-02', '10');
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('20', 'L2 unit #20', '00000');
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('20-01', 'L3 unit #20-01', '20');
    
    INSERT INTO organization_unit (unit_code, unit_name, parent_unit_code) 
    VALUES ('20-02', 'L3 unit #20-02', '20');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param1, param2, param3)
    VALUES ('00000', 'Default value', 'Default value', 'Default value');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2, param3)
    VALUES ('10', 'Value from 10', 'Value from 10');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param3)
    VALUES ('10-01', 'Value from 10-01');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param4)
    VALUES ('10-02', 'Value from 10-02');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param1, param2, param3)
    VALUES ('20', 'Value from 20', 'Value from 20', 'Value from 20');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2)
    VALUES ('20-01', 'Value from 20-01');
    
    INSERT INTO ORG_UNIT_PARAMETERS (unit_code, param2)
    VALUES ('20-02', 'Value from 20-02');
       
    COMMIT;

    Hi, Bruno.

    You almost had it!
    Take your query that gets good results for a single node. Remove the START WITH clause so that it does the same thing for each node. You will need to add CONNECT_BY_ROOT to remember what node you started with in each case and PARTITION BY calling value in all the LAST_VALUE function:

    WITH hierarchy
    AS
    (
         SELECT  ou.unit_code               AS ancestor_unit_code,
                     LEVEL                    AS lvl,
              CONNECT_BY_ROOT      ou.unit_code     AS descendant_unit_code
           FROM        organization_unit     ou
           CONNECT BY    ou.unit_code  = PRIOR  ou.parent_unit_code
    )
    , got_params     AS
    (
         SELECT       h.descendant_unit_code          AS unit_code
         ,       h.lvl
         ,       LAST_VALUE (p.param1  IGNORE NULLS) OVER ( PARTITION BY  h.descendant_unit_code
                                                                ORDER BY        lvl     DESC
                                               )    AS param1
         ,       LAST_VALUE (p.param2  IGNORE NULLS) OVER ( PARTITION BY  h.descendant_unit_code
                                                                ORDER BY        lvl     DESC
                                               )    AS param2
         ,       LAST_VALUE (p.param3  IGNORE NULLS) OVER ( PARTITION BY  h.descendant_unit_code
                                                                ORDER BY        lvl     DESC
                                               )    AS param3
         ,       LAST_VALUE (p.param4  IGNORE NULLS) OVER ( PARTITION BY  h.descendant_unit_code
                                                                ORDER BY        lvl     DESC
                                               )    AS param4
         FROM               hierarchy           h
         LEFT OUTER JOIN  org_unit_parameters     p  ON     h.ancestor_unit_code     = p.unit_code
    )
    SELECT       unit_code, param1, param2, param3, param4
    FROM       got_params
    WHERE       lvl     = 1
    ;
    

    Output:

    NIT_ PARAM1           PARAM2           PARAM3           PARAM4
    ----- ---------------- ---------------- ---------------- ----------------
    00000 Default value    Default value    Default value
    10    Default value    Value from 10    Value from 10
    10-01 Default value    Value from 10    Value from 10-01
    10-02 Default value    Value from 10    Value from 10    Value from 10-02
    20    Value from 20    Value from 20    Value from 20
    20-01 Value from 20    Value from 20-01 Value from 20
    20-02 Value from 20    Value from 20-02 Value from 20
    

    I hope that's what you want. I don't see the exact results you wanted posted anywhere.

    Thanks for posting the CREATE TABLE and INSERT statements; It is very useful.

    The difference between LAST_VALUE (... DESC) and FIRST_VALUE (... CSA) has to do with the default windowing.
    Say that we try to calculate FIRST_VALUE and LAST_VALUE on a line where lvl = 1, and it has 2 and 3 lvls in the same partition.
    LAST_VALUE (... ORDER BY DESC lvl) means the window includes lvl = values 1 and all the highest (i.e., 2 and 3).
    FRIST_VALUE (...) ORDER BY DESC lvl) means the window includes lvl = 1 and all the values (which, of course, their absence)
    It is because the widow of default is BETWEEN UNBOUNDED PREVIOUS AND CURRENT ROW, where "preceding" means lower values if you use ascending order, but higher values if you use descending order. We could use FIRST_VALUE to get the same results, but we will have to explicitly set the window in BETWEEN CURRENT_ROW AND UNBOUNDED FOLLOWING.

    Published by: Frank Kulash, November 12, 2010 12:46
    Additional explanation of LAST_VALUE

    Published by: Frank Kulash, November 12, 2010 13:04
    Beheading has been corrected.

  • Added DATE_FORMAT to my query bombs he... I want to know why

    Hi all

    Well, I write a VERY simple page that shows the user a lidt of recent updates to data in a database defined timed for release.

    This query works absolutely perfect:

    $conn = dbConnect ('query');
    $sql = "SELECT."
    ANNEX
    WHERE start_date arguments < = CURDATE)
    AND end_date > CURDATE)
    ORDER BY store_number ASC";
    $result = $conn-> Query or die (mysqli_error ());
    $upDates = $result-> fetch_assoc();

    BUT...

    .. When I add a DATE_FORMAT command such as shown below...

    $conn = dbConnect ('query');
    $sql = "SELECT."
    ANNEX
    WHERE start_date arguments < = CURDATE)
    AND end_date > CURDATE)
    ORDER BY store_number CSA
    Date_format(start_date, '%M/%e/%D/%Y') AS start_date";
    $result = $conn-> Query or die (mysqli_error ());
    $upDates = $result-> fetch_assoc();

    .. .He bombs.

    This query selects all the data of a table of 4 columns and displays the data perfectly in the first example, as I mentioned. I don't like the date format, and I wanted to change, so the addition of the DATE_FORMAT in the second example. Start_date is one of the columns in my table called "Annex".

    Please tell me why it is bombing. I don't have a clue and have analyzed and tested again the code without success.

    Thank you very much in advance for your help!

    Sincerely,

    wordman

    The SQL is not valid. You can just add a select column at the end of a SQL query. You must respect the basic rules of the SQL structure. Select columns must appear before the FROM clause.

    $conn = dbConnect ('query');
    $sql = "SELECT *, DATE_FORMAT(start_date, '%M/%e/%D/%Y') AS start_date1.
    ANNEX
    WHERE start_date arguments<=>
    AND end_date > CURDATE)
    ORDER BY store_number ASC";
    $result = $conn-> query ($sql) or die (mysqli_error ());
    $upDates = $result-> fetch_assoc();

    I have an alias in start_date to start_date1 to avoid ambiguity.  I don't know MySQL so I take just your function DATE_FORMAT is delivered.

  • query of queries case-sensitive

    Hello

    I have a question regarding this issue.  I am pulling data from an xml file and dump these data in the query of queries and their output.  The problem is when I try to order the CSA query, the stem will be high and fewer will be on the bottom.  Is it possible to sort them before the dump in query data?  Or ways around this?

    Thank you.

    functions upper() and lower() SQL function in q.

  • Options other than query joins?

    I have a table column called "Inc." - each cell has one of 3 values: null, 1, or 2. I would like to know two things: 1 s, how many, and how 1s + 2s exist, so I can find the percentage of 1 s compared to total (1s + 2s, ignoring null values).

    I have a main request, which gets other data so I created a query1 for the 1s in INC. and joined 2 queries for a revised request, i created a query to get the s 2 then I got that attached to the revised request, creating a final query (for a total of 5 queries).

    I could do it in a simpler way using 'CASE' or subqueries (I tried these but I hope they have bombed positions because I have bad)

    Here's my faulty code - even if it doesn't work, I think it clarifies what I'm trying to do.

    SELECT AVG (INC_AMT) AS AvgIncentive,
    Count (Units) AS TotalBldgs,
    Turnover of AVG(Turn/Units) AS,
    AVG (DAYS_VAC) AS DaysVac,
    AVG (RENT_INC) AS ProjRentIncr,
    Max (VACY_DATE) AS MaxDate,
    SurveyGroup,
    Count (SELECT CASE WHEN INC = '1', THEN '1' END AS BldgsWithIncent), (BldgsWithIncent)
    Count (SELECT CASE WHEN INC = '1', THEN '1' END AS BldgsWithOutIncent) (BldgsWithOutIncent)
    OF tblOne
    WHERE SurveyGroup IS NOT NULL
    SurveyGroup GROUP
    ORDER BY Max (VACY_DATE) CSA


    Thank you
    Mike

    Select num1, num1and2, num1/total * 100 percentage
    of (num1 count (inc) select)
    FROM table1
    where Inc. = 1),
    (select count (inc) num1and2
    FROM table1
    where Inc. is not null) b.
    (select count (inc) total)
    FROM table1) c

  • display data in the order of the CSA

    Hello

    I want to display these data in the order of the CSA, but its doesn't come not properly arrested IE by the no.

    Column
    1 abc defg
    2 aer ftg
    Cheikh Tidiane 11 efg
    20 Amps efg

    I use this query
    Select f_n had order by regexp_substr(f_n,'[0-9]*',1)

    but then this comes as
    1 abc defg
    Cheikh Tidiane 11 efg
    2 aer ftg
    20 Amps efg

    I want to like

    1 abc defg
    2 aer ftg
    Cheikh Tidiane 11 efg
    20 Amps efg

    Thank you

    Hello

    user13305573 wrote:
    Thank you

    It works
    I wanted to know one thing

    If I have a columnr as
    1.1.1 abc efg
    1.1.2 bdg efg

    So how can I use the query so that I can get the results in the order of the CSA.

    I use like this order of

    order by to_number (regexp_substr (f_n,'[0-9] + (\.))) [ 0-9] *) ?', 1)) ;

    But it's 1.1 and 1.2 correctly and not for large 1.1.1

    It would be sort "1.11' front ' 1.2'; This is not what you want, is it?

    I think that's what you want:

    order by  to_number (regexp_substr (f_n, '[0-9]+', 1, 1))
    ,       to_number (regexp_substr (f_n, '[0-9]+', 1, 2))
    ,       to_number (regexp_substr (f_n, '[0-9]+', 1, 3))
    

    The 4th argument to REGEXP_SUBSTR he said what case to take.

Maybe you are looking for

  • Hey Apple EL Capitan, tear off my ethernet connection how to fix

    Hey Apple EL Capitan high my ethernet connection how to fix it.

  • Reinstall XP Pro?

    OK, I've had this laptop in my basement, gathering dust... So now, I tried to use it as an emergency equipment in the garage just for surfing and facebook... YES I KNOW! In any case, I had to format the hard drive and lost the OS. Is it possible to r

  • How to access the files after you put the hard drive in the external case

    I dropped my laptop and it is split.  I bought an external case for hard drive, only to discover, when I try to access the files, I'm not authourized to do.  I know the password, how do I access files, without having to pay someone a large sum of mon

  • Missing Desktop tab

    I wanted to change my background on my computer so I went to display to change to office... problem... I do not have a tab for the office, he just disappeared! That's happened? I accidentally remove it without knowing? How can I get that back?  I tri

  • failed to connect to the virtual console (Java) iDRAC7 - PowerEdge r.620

    I am trying to run the Console java applet virtual iDRAC7. After clicking through several pop-up windows, die "connection to the server of virtual console...". THE CONNECTION HAS FAILED. How to solve this problem? -If the machine is PowerEdge r.620 w