Question about De-Factoring a query

Good afternoon,
I have the following query that produces the results I want (it does a DENSE_RANK):
with agelist as
   select age
     from student
    group by age
select age,
        select count(*)
          from agelist x
         where x.age <= agelist.age
       )                                as rankedage
  from agelist
order by rankedage
;As an exercise (I'm learning SQL), I wanted to write the equivalent query without using the WITH clause (and without using DENSE_RANK either - in other words, keeping it plain vanilla SQL). Everything I've tried either gives wrong results or a syntax error <chuckle>.
the question is: What does the working query ;) look like without the WITH (effectively defactoring the "agelist" query ?
Thank you for your help,
John.
DDL to run the query I posted:
  /* table of students */
     create table student
     ( sno integer,
       sname varchar(10),
       age integer
        insert into student values (1,'AARON',20);
        insert into student values (2,'CHUCK',21);
        insert into student values (3,'DOUG',20);
        insert into student values (4,'MAGGIE',19);
        insert into student values (5,'STEVE',22);
        insert into student values (6,'JING',18);
        insert into student values (7,'BRIAN',21);
        insert into student values (8,'KAY',20);
        insert into student values (9,'GILLIAN',20);
        insert into student values (10,'CHAD',21);Edited by: 440bx - 11gR2 on Jul 30, 2010 3:13 PM corrected misspelling in defactoring

Sorry, but I'm not quite sure what you're trying to do.
Your WITH clause returns a distinct list of ages. So any ranking can only be a dense_rank since you'll never have a tie. The rownum solution posted by Clearance will accomplish the same thing.
The whole point of RANK vs DENSE_RANK is how to number the results in the event of equal numbers in the list. Using a distinct or group by kind of defeats the purpose.
If you comment out the GROUP BY in WITH clause, you get this:
SQL> with agelist as
  2    (
  3     select age
  4       from student
  5      --group by age
  6    )
  7  select age,
  8         (
  9          select count(*)
10            from agelist x
11           where x.age <= agelist.age
12         )                                as rankedage
13    from agelist
14   order by rankedage
15  ;
                 AGE            RANKEDAGE
                  18                    1
                  19                    2
                  20                    6
                  20                    6
                  20                    6
                  20                    6
                  21                    9
                  21                    9
                  21                    9
                  22                   10That's not a dense rank or even a regular rank. Ages that have duplicates are assigned the lowest ranking in their group.
Using the RANK analytic function, you get this:
SQL> select age
  2        ,rank() over (order by age) r
  3  from   student;
                 AGE                    R
                  18                    1
                  19                    2
                  20                    3
                  20                    3
                  20                    3
                  20                    3
                  21                    7
                  21                    7
                  21                    7
                  22                   10And using DENSE_RANK you get this:
SQL> select age
  2        ,dense_rank() over (order by age) r
  3  from   student;
                 AGE                    R
                  18                    1
                  19                    2
                  20                    3
                  20                    3
                  20                    3
                  20                    3
                  21                    4
                  21                    4
                  21                    4
                  22                    5

Similar Messages

  • Another BW question about filter in the query definition

    Hi ,
    I have another question about filter in the query definition.
    <u>Question:</u>
    Which of the following objects can be filtered in the query definition?
    A. characteristic
    B. Key figure
    C. Structure
    D. Units
    E. Hierarchy
    My answer is A,B,D,E.
    The answer in the book is A,B,D
    Can anybody tell me which one is wrong?
    Thanks in advance,
    Liu Jia

    HI
    1.The answer could be A,B,D.you can not apply filters on hierarchies
    2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
    sri

  • Question about SUM in SQL query

    I have a SQL ststement which is listed below along with it's output.
    For the NUM_REQ column, I am expecting to get the number 832 because the pm_requirements_table contains 16 records and they all have a frequency of WEEKLY.
    16 * 52 = 832. The query returns 12480 which I can see that it is multiplying the 832 by 15 which is the number of entries in the lpm table 16 * 52 * 15 = 12480.
    I need the lpm table in there for other reasons, so my question is how can I get it to return 832 and still have the lpm table as part of the query.
    Thanks,
    George
    SQL
    SELECT 'NAS WIDE' as target
    , 1 as years
    , count(distinct lpm.fac_ident) as facilities
    , SUM(CASE  upper(req.frequency)
      WHEN 'DAILY' THEN 365
      WHEN 'WEEKLY' THEN 52
      WHEN 'MONTHLY' THEN 12
      WHEN 'QUARTERLY' THEN 4
      WHEN 'SEMIANNUALLY' THEN 2
      WHEN 'ANNUALLY' THEN 1
      ELSE 0
    END) as num_req
    FROM lpm, pm_requirements_table req
    group by 'NAS WIDE';OUTPUT
    "TARGET","YEARS","FACILITIES","NUM_REQ"
    "NAS WIDE",1,1,12480
    -- PM_REQUIREMENTS_TABLE
    "PUBLICATION_ORDER","PUBLICATION_PARAGRAPH_NUMBER","DESCRIPTION","FREQUENCY","CHECK_OR_MAINTENANCE","PRTANTAC_ID"
    "6310.19A","161A","Check transmitter average rf power output","WEEKLY","",2
    "6310.19A","161B","Check transmitter VSWR","WEEKLY","",3
    "6310.19A","161C","Check RMS transmitter pulse width","WEEKLY","",4
    "6310.19A","161D(1)","Check filament current","WEEKLY","",5
    "6310.19A","161D(2)","Check focus coil current","WEEKLY","",6
    "6310.19A","161D(3)","Check Klystron voltage","WEEKLY","",7
    "6310.19A","161D(4)","Check Klystron current","WEEKLY","",8
    "6310.19A","161D(5)","Check PFN voltage","WEEKLY","",9
    "6310.19A","161D(6)","Check vacuum pump current","WEEKLY","",10
    "6310.19A","161E","Check target receiver MDS","WEEKLY","",11
    "6310.19A","161F","Check target receiver NF","WEEKLY","",12
    "6310.19A","161G","Check target receiver recovery","WEEKLY","",13
    "6310.19A","161H","Check weather receiver MDS","WEEKLY","",14
    "6310.19A","161I","Check weather receiver NF","WEEKLY","",15
    "6310.19A","161J","Check weather receiver recovery","WEEKLY","",16
    "6310.19A","161K","Check spare modem operation","WEEKLY","",17
    -- LPM table
    "LOG_ID","FAC_IDENT","FAC_TYPE","CODE_CATEGORY","SUPPLEMENTAL_CODE","MAINT_ACTION_CODE","INTERRUPT_CONDITION","ATOW_CODE","SECTOR_CODE","LOG_STATUS","START_DATE","START_DATETIME","END_DATE","END_DATETIME","MODIFIED_DATETIME","WR_AREA","SHORT_NAME","EQUIPMENT_IDENT","INTERVAL_CODE","EARLIEST_DATE","EARLIEST_DATETIME","SCHEDULED_DATE","SCHEDULED_DATETIME","LATEST_DATE","LATEST_DATETIME","WR_CREW_UNIT","WR_WATCH","PUBLICATION_ORDER","PUBLICATION_ORDER_ORIGINAL","PUBLICATION_PARAGRAPH","PUBLICATION_PARAGRAPH_ORIGINAL","NUMBER_OF_TASKS","LOG_SUMMARY","COMMENTS","RELATED_LOGS","LPMANTAC_ID"
    108305902,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",07-MAY-10,"05/07/2010 3:24",07-MAY-10,"05/07/2010 3:28","05/07/2010 3:31","RADAR","SYS","SYSTEM","W","05/02/2010","05/02/2010 0:00",05-MAY-10,"05/05/2010 0:00",08-MAY-10,"05/08/2010 0:00","RADR","","6310.19A","6310.19A","161.K","161. K","1","","","",1
    108306002,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",02-MAY-10,"05/02/2010 21:00",02-MAY-10,"05/02/2010 21:30","05/03/2010 1:07","RADAR","SYS","CHAN B","W","05/02/2010","05/02/2010 0:00",05-MAY-10,"05/05/2010 0:00",08-MAY-10,"05/08/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",2
    108306102,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",02-MAY-10,"05/02/2010 21:00",02-MAY-10,"05/02/2010 21:30","05/03/2010 1:07","RADAR","SYS","CHAN A","W","05/02/2010","05/02/2010 0:00",05-MAY-10,"05/05/2010 0:00",08-MAY-10,"05/08/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",3
    104188702,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",29-APR-10,"4/29/2010 10:09",29-APR-10,"4/29/2010 10:11","4/29/2010 10:30","RADAR","SYS","SYSTEM","W","4/25/2010","4/25/2010 0:00",28-APR-10,"4/28/2010 0:00",01-MAY-10,"05/01/2010 0:00","RADR","","6310.19A","6310.19A","161.K","161. K","1","","","",4
    104188402,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",26-APR-10,"4/26/2010 13:33",26-APR-10,"4/26/2010 13:46","4/26/2010 15:23","RADAR","SYS","CHAN A","W","4/25/2010","4/25/2010 0:00",28-APR-10,"4/28/2010 0:00",01-MAY-10,"05/01/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",5
    104188502,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",26-APR-10,"4/26/2010 13:33",26-APR-10,"4/26/2010 13:46","4/26/2010 15:23","RADAR","SYS","CHAN B","W","4/25/2010","4/25/2010 0:00",28-APR-10,"4/28/2010 0:00",01-MAY-10,"05/01/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",6
    101223702,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",19-APR-10,"4/19/2010 1:30",19-APR-10,"4/19/2010 2:10","4/19/2010 3:12","RADAR","SYS","CHAN B","W","4/18/2010","4/18/2010 0:00",21-APR-10,"4/21/2010 0:00",24-APR-10,"4/24/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",7
    101223802,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",19-APR-10,"4/19/2010 1:30",19-APR-10,"4/19/2010 2:10","4/19/2010 3:12","RADAR","SYS","CHAN A","W","4/18/2010","4/18/2010 0:00",21-APR-10,"4/21/2010 0:00",24-APR-10,"4/24/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",8
    101223602,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",19-APR-10,"4/19/2010 1:00",19-APR-10,"4/19/2010 1:09","4/19/2010 3:12","RADAR","SYS","SYSTEM","W","4/18/2010","4/18/2010 0:00",21-APR-10,"4/21/2010 0:00",24-APR-10,"4/24/2010 0:00","RADR","","6310.19A","6310.19A","161.K","161. K","1","","","",9
    96642602,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",12-APR-10,"04/12/2010 10:25",12-APR-10,"04/12/2010 10:34","04/12/2010 17:49","RADAR","SYS","SYSTEM","W","04/11/2010","04/11/2010 0:00",14-APR-10,"4/14/2010 0:00",17-APR-10,"4/17/2010 0:00","RADR","","6310.19A","6310.19A","161.K","161. K","1","","","",10
    96642402,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",11-APR-10,"04/11/2010 11:10",11-APR-10,"04/11/2010 11:15","04/11/2010 12:51","RADAR","SYS","CHAN B","W","04/11/2010","04/11/2010 0:00",14-APR-10,"4/14/2010 0:00",17-APR-10,"4/17/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",11
    96642302,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",11-APR-10,"04/11/2010 11:05",11-APR-10,"04/11/2010 11:10","04/11/2010 12:51","RADAR","SYS","CHAN A","W","04/11/2010","04/11/2010 0:00",14-APR-10,"4/14/2010 0:00",17-APR-10,"4/17/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",12
    92805502,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",07-APR-10,"04/07/2010 18:10",07-APR-10,"04/07/2010 18:22","04/07/2010 19:04","RADAR","SYS","CHAN A","W","04/04/2010","04/04/2010 0:00",07-APR-10,"04/07/2010 0:00",10-APR-10,"04/10/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",13
    92805402,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",07-APR-10,"04/07/2010 17:53",07-APR-10,"04/07/2010 18:05","04/07/2010 19:04","RADAR","SYS","CHAN B","W","04/04/2010","04/04/2010 0:00",07-APR-10,"04/07/2010 0:00",10-APR-10,"04/10/2010 0:00","RADR","","6310.19A","6310.19A","161A-J","161 A-J","15","","","",14
    92805302,"ATL","ASR",50,"0","P","","WEQ1C","SO1LB","C",07-APR-10,"04/07/2010 9:55",07-APR-10,"04/07/2010 10:05","04/07/2010 10:29","RADAR","SYS","SYSTEM","W","04/04/2010","04/04/2010 0:00",07-APR-10,"04/07/2010 0:00",10-APR-10,"04/10/2010 0:00","RADR","","6310.19A","6310.19A","161.K","161. K","1","","","",15Edited by: George Heller on Jul 15, 2011 10:32 AM

    -- LPM
    CREATE TABLE "LPM"
        "LOG_ID"              NUMBER(22,0) NOT NULL ENABLE,
        "FAC_IDENT"           VARCHAR2(5),
        "FAC_TYPE"            VARCHAR2(5),
        "CODE_CATEGORY"       NUMBER(22,0) NOT NULL ENABLE,
        "SUPPLEMENTAL_CODE"   VARCHAR2(1),
        "MAINT_ACTION_CODE"   VARCHAR2(1),
        "INTERRUPT_CONDITION" VARCHAR2(22),
        "ATOW_CODE"           VARCHAR2(22),
        "SECTOR_CODE"         VARCHAR2(5),
        "LOG_STATUS"          VARCHAR2(3) NOT NULL ENABLE,
        "START_DATE" DATE,
        "START_DATETIME" VARCHAR2(22),
        "END_DATE" DATE,
        "END_DATETIME"      VARCHAR2(22),
        "MODIFIED_DATETIME" VARCHAR2(22),
        "WR_AREA"           VARCHAR2(6),
        "SHORT_NAME"        VARCHAR2(15),
        "EQUIPMENT_IDENT"   VARCHAR2(15),
        "INTERVAL_CODE"     VARCHAR2(255),
        "EARLIEST_DATE"     VARCHAR2(4000),
        "EARLIEST_DATETIME" VARCHAR2(255),
        "SCHEDULED_DATE" DATE,
        "SCHEDULED_DATETIME" VARCHAR2(22),
        "LATEST_DATE" DATE,
        "LATEST_DATETIME"                VARCHAR2(22),
        "WR_CREW_UNIT"                   VARCHAR2(10),
        "WR_WATCH"                       VARCHAR2(1),
        "PUBLICATION_ORDER"              VARCHAR2(30),
        "PUBLICATION_ORDER_ORIGINAL"     VARCHAR2(30),
        "PUBLICATION_PARAGRAPH"          VARCHAR2(30),
        "PUBLICATION_PARAGRAPH_ORIGINAL" VARCHAR2(30),
        "NUMBER_OF_TASKS"                VARCHAR2(25),
        "LOG_SUMMARY"                    VARCHAR2(255),
        "COMMENTS" CLOB,
        "RELATED_LOGS" CLOB,
        "LPMANTAC_ID" NUMBER,
        PRIMARY KEY ("LPMANTAC_ID") ENABLE
      CREATE UNIQUE INDEX "SYS_IL0000077142C00035$$" ON "LPM"
    -- LPM_PARAGRAPH_MAPPING
    CREATE TABLE "LPM_PARAGRAPH_MAPPING_TABLE"
        "PUBLICATION_ORDER"       VARCHAR2(30),
        "PUBLICATION_PARAGRAPH"   VARCHAR2(30),
        "PARAGRAPH_ALIAS_MAPPING" VARCHAR2(30),
        "LPMTANTAC_ID"            NUMBER,
        PRIMARY KEY ("LPMTANTAC_ID") ENABLE
      CREATE UNIQUE INDEX "SYS_C0011587" ON "LPM_PARAGRAPH_MAPPING_TABLE"
        "LPMTANTAC_ID"
      -- PM_REQUIREMENTS_TABLE
    CREATE TABLE "PM_REQUIREMENTS_TABLE"
        "PUBLICATION_ORDER"            VARCHAR2(30),
        "PUBLICATION_PARAGRAPH_NUMBER" VARCHAR2(30),
        "DESCRIPTION"                  VARCHAR2(4000),
        "FREQUENCY"                    VARCHAR2(30),
        "CHECK_OR_MAINTENANCE"         VARCHAR2(22),
        "PRTANTAC_ID"                  NUMBER,
        PRIMARY KEY ("PRTANTAC_ID") ENABLE
      CREATE UNIQUE INDEX "SYS_C0011588" ON "PM_REQUIREMENTS_TABLE"
        "PRTANTAC_ID"
    REM INSERTING into LPM
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (108305902,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('07-MAY-10','DD-MON-RR'),'05/07/2010 3:24',to_date('07-MAY-10','DD-MON-RR'),'05/07/2010 3:28','05/07/2010 3:31','RADAR','SYS','SYSTEM','W','05/02/2010','05/02/2010 0:00',to_date('05-MAY-10','DD-MON-RR'),'05/05/2010 0:00',to_date('08-MAY-10','DD-MON-RR'),'05/08/2010 0:00','RADR',null,'6310.19A','6310.19A','161.K','161. K','1',null,1);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (108306002,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('02-MAY-10','DD-MON-RR'),'05/02/2010 21:00',to_date('02-MAY-10','DD-MON-RR'),'05/02/2010 21:30','05/03/2010 1:07','RADAR','SYS','CHAN B','W','05/02/2010','05/02/2010 0:00',to_date('05-MAY-10','DD-MON-RR'),'05/05/2010 0:00',to_date('08-MAY-10','DD-MON-RR'),'05/08/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,2);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (108306102,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('02-MAY-10','DD-MON-RR'),'05/02/2010 21:00',to_date('02-MAY-10','DD-MON-RR'),'05/02/2010 21:30','05/03/2010 1:07','RADAR','SYS','CHAN A','W','05/02/2010','05/02/2010 0:00',to_date('05-MAY-10','DD-MON-RR'),'05/05/2010 0:00',to_date('08-MAY-10','DD-MON-RR'),'05/08/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,3);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (104188702,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('29-APR-10','DD-MON-RR'),'4/29/2010 10:09',to_date('29-APR-10','DD-MON-RR'),'4/29/2010 10:11','4/29/2010 10:30','RADAR','SYS','SYSTEM','W','4/25/2010','4/25/2010 0:00',to_date('28-APR-10','DD-MON-RR'),'4/28/2010 0:00',to_date('01-MAY-10','DD-MON-RR'),'05/01/2010 0:00','RADR',null,'6310.19A','6310.19A','161.K','161. K','1',null,4);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (104188402,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('26-APR-10','DD-MON-RR'),'4/26/2010 13:33',to_date('26-APR-10','DD-MON-RR'),'4/26/2010 13:46','4/26/2010 15:23','RADAR','SYS','CHAN A','W','4/25/2010','4/25/2010 0:00',to_date('28-APR-10','DD-MON-RR'),'4/28/2010 0:00',to_date('01-MAY-10','DD-MON-RR'),'05/01/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,5);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (104188502,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('26-APR-10','DD-MON-RR'),'4/26/2010 13:33',to_date('26-APR-10','DD-MON-RR'),'4/26/2010 13:46','4/26/2010 15:23','RADAR','SYS','CHAN B','W','4/25/2010','4/25/2010 0:00',to_date('28-APR-10','DD-MON-RR'),'4/28/2010 0:00',to_date('01-MAY-10','DD-MON-RR'),'05/01/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,6);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (101223702,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 1:30',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 2:10','4/19/2010 3:12','RADAR','SYS','CHAN B','W','4/18/2010','4/18/2010 0:00',to_date('21-APR-10','DD-MON-RR'),'4/21/2010 0:00',to_date('24-APR-10','DD-MON-RR'),'4/24/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,7);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (101223802,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 1:30',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 2:10','4/19/2010 3:12','RADAR','SYS','CHAN A','W','4/18/2010','4/18/2010 0:00',to_date('21-APR-10','DD-MON-RR'),'4/21/2010 0:00',to_date('24-APR-10','DD-MON-RR'),'4/24/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,8);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (101223602,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 1:00',to_date('19-APR-10','DD-MON-RR'),'4/19/2010 1:09','4/19/2010 3:12','RADAR','SYS','SYSTEM','W','4/18/2010','4/18/2010 0:00',to_date('21-APR-10','DD-MON-RR'),'4/21/2010 0:00',to_date('24-APR-10','DD-MON-RR'),'4/24/2010 0:00','RADR',null,'6310.19A','6310.19A','161.K','161. K','1',null,9);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (96642602,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('12-APR-10','DD-MON-RR'),'04/12/2010 10:25',to_date('12-APR-10','DD-MON-RR'),'04/12/2010 10:34','04/12/2010 17:49','RADAR','SYS','SYSTEM','W','04/11/2010','04/11/2010 0:00',to_date('14-APR-10','DD-MON-RR'),'4/14/2010 0:00',to_date('17-APR-10','DD-MON-RR'),'4/17/2010 0:00','RADR',null,'6310.19A','6310.19A','161.K','161. K','1',null,10);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (96642402,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('11-APR-10','DD-MON-RR'),'04/11/2010 11:10',to_date('11-APR-10','DD-MON-RR'),'04/11/2010 11:15','04/11/2010 12:51','RADAR','SYS','CHAN B','W','04/11/2010','04/11/2010 0:00',to_date('14-APR-10','DD-MON-RR'),'4/14/2010 0:00',to_date('17-APR-10','DD-MON-RR'),'4/17/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,11);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (96642302,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('11-APR-10','DD-MON-RR'),'04/11/2010 11:05',to_date('11-APR-10','DD-MON-RR'),'04/11/2010 11:10','04/11/2010 12:51','RADAR','SYS','CHAN A','W','04/11/2010','04/11/2010 0:00',to_date('14-APR-10','DD-MON-RR'),'4/14/2010 0:00',to_date('17-APR-10','DD-MON-RR'),'4/17/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,12);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (92805502,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 18:10',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 18:22','04/07/2010 19:04','RADAR','SYS','CHAN A','W','04/04/2010','04/04/2010 0:00',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 0:00',to_date('10-APR-10','DD-MON-RR'),'04/10/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,13);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (92805402,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 17:53',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 18:05','04/07/2010 19:04','RADAR','SYS','CHAN B','W','04/04/2010','04/04/2010 0:00',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 0:00',to_date('10-APR-10','DD-MON-RR'),'04/10/2010 0:00','RADR',null,'6310.19A','6310.19A','161A-J','161 A-J','15',null,14);
    Insert into LPM (LOG_ID,FAC_IDENT,FAC_TYPE,CODE_CATEGORY,SUPPLEMENTAL_CODE,MAINT_ACTION_CODE,INTERRUPT_CONDITION,ATOW_CODE,SECTOR_CODE,LOG_STATUS,START_DATE,START_DATETIME,END_DATE,END_DATETIME,MODIFIED_DATETIME,WR_AREA,SHORT_NAME,EQUIPMENT_IDENT,INTERVAL_CODE,EARLIEST_DATE,EARLIEST_DATETIME,SCHEDULED_DATE,SCHEDULED_DATETIME,LATEST_DATE,LATEST_DATETIME,WR_CREW_UNIT,WR_WATCH,PUBLICATION_ORDER,PUBLICATION_ORDER_ORIGINAL,PUBLICATION_PARAGRAPH,PUBLICATION_PARAGRAPH_ORIGINAL,NUMBER_OF_TASKS,LOG_SUMMARY,LPMANTAC_ID) values (92805302,'ATL','ASR',50,'0','P',null,'WEQ1C','SO1LB','C',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 9:55',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 10:05','04/07/2010 10:29','RADAR','SYS','SYSTEM','W','04/04/2010','04/04/2010 0:00',to_date('07-APR-10','DD-MON-RR'),'04/07/2010 0:00',to_date('10-APR-10','DD-MON-RR'),'04/10/2010 0:00','RADR',null,'6310.19A','6310.19A','161.K','161. K','1',null,15);
    REM INSERTING into PM_REQUIREMENTS_TABLE
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161A','Check transmitter average rf power output','WEEKLY',null,2);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161B','Check transmitter VSWR','WEEKLY',null,3);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161C','Check RMS transmitter pulse width','WEEKLY',null,4);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(1)','Check filament current','WEEKLY',null,5);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(2)','Check focus coil current','WEEKLY',null,6);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(3)','Check Klystron voltage','WEEKLY',null,7);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(4)','Check Klystron current','WEEKLY',null,8);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(5)','Check PFN voltage','WEEKLY',null,9);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161D(6)','Check vacuum pump current','WEEKLY',null,10);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161E','Check target receiver MDS','WEEKLY',null,11);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161F','Check target receiver NF','WEEKLY',null,12);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161G','Check target receiver recovery','WEEKLY',null,13);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161H','Check weather receiver MDS','WEEKLY',null,14);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161I','Check weather receiver NF','WEEKLY',null,15);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161J','Check weather receiver recovery','WEEKLY',null,16);
    Insert into PM_REQUIREMENTS_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH_NUMBER,DESCRIPTION,FREQUENCY,CHECK_OR_MAINTENANCE,PRTANTAC_ID) values ('6310.19A','161K','Check spare modem operation','WEEKLY',null,17);
    REM INSERTING into LPM_PARAGRAPH_MAPPING_TABLE
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161A','161',26);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161A','161A-J',27);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161B','161',28);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161B','161A-J',29);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161C','161',30);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161C','161A-J',31);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161C','161(A-->K)',32);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161C','161(A-K)',33);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161C','161.(A-C).',34);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(1)','161',35);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(1)','161161 A-J',36);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(1)','161(A-->K)',37);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(1)','161(A-D)',38);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(2)','161',39);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(2)','161 A-J',40);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161D(2)','161(A-->K)',41);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161E','161E/H',42);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161F','161E/H',43);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161G','161E/H',44);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161H','161E/H',45);
    Insert into LPM_PARAGRAPH_MAPPING_TABLE (PUBLICATION_ORDER,PUBLICATION_PARAGRAPH,PARAGRAPH_ALIAS_MAPPING,LPMTANTAC_ID) values ('6310.19A','161K','161.K',46);Edited by: George Heller on Jul 15, 2011 11:09 AM

  • Question about Hibernate vs select query/EJB

    HI all
    i just want to understand the benefit of using Hibernate to map table to java object. normally we use select sql to get data and populate objects with the result set for simple situation, and if it gets complicated, we may use Entity Beans for persistence. now we have this hibernate concept that maps a table to a object, and use the hibernate APIs or queries to populate data. what is the big difference. the hibernate claims to be ultra high performance, any thought? thanks for your help and insight.

    I have to say I wonder whether EJBs are much use at all. I think we need to explicitly say entity beans here. I think SLSBs and MDBs are decent and will remain even if CMP entity beans fade.
    The EJB model says have a container because it takes care of a lot of things for you (e.g., distributed, transactions, threading, clustering, lifecycle, etc.) For those apps that don't need those things, don't use EJBs.
    They have the feeling of being one of those management-driven fads. I think it's more like Sun and the designers of EJB had an initial idea, EJB 1.0, that has turned out to be non-performant. EJB 2.0 tried to fix it with CMP. Still didn't work. We'll see if POJOs and ORM are the answer. Check back in five years. There's a lot to like, but I'm sure EJB 1.0 was the best effort by smart folks, too.
    When you come down to it the
    attraction seems to be the idea that you can use
    weaker programmers (and I doubt the reality of that,
    either).I don't think anybody ever said that. EJBs aren't trivial. The container relieves programmers from having to write their own transactions, threading, etc., but what's left is hardly "easy".
    Certainly they've got to be extremely costly on
    comupting and (more importantly) network power, and I
    find it hard to believe they really simplify coding.I think the cost on computing and network power are just part of writing enterprise apps, which is where the E in EJB came from.
    Lots of times the network problems come about because naive programmers do n+1 queries when n will do. Hibernate helps with that.
    %

  • Question about calculation example with Query Designer

    Hi guys,
    I have to calculate within columns and rows and I am not familiar with the settings in Query Designer that could be done to achieve the results.
    For example:
    Payments----
    Delay -
    Weighted Delay
    1000USD--10 days--
    10000
    2000USD--20 days--
    40000
    3000USD--xxx--
    50000 (this is the sum row)
    The column marked with the xxx is calculated with the sum of weighted delay divided by the sum of payments (50000 / 3000).
    Has anybody an idea how the sum row can be calculated separately?
    Thank you for suggestions!
    Edited by: saplaz on Jul 13, 2010 8:47 AM
    Edited by: saplaz on Jul 13, 2010 9:08 AM

    Hi,
    Assuming you have the Payments Infoobject in the rows and WD Infoobject in the columns; Delay as a formula object.
    > Payments----
    Delay -
    Weighted Delay
    > 1000USD--10 days--
    10000
    > 2000USD--20 days--
    40000
    > 3000USD--xxx--
    50000 (this is the sum row)
    > The column marked with the xxx is calculated with the sum of weighted delay divided by the sum of payments (50000 / 3000).
    You may try this workaround of using
    NODIM( SUMCT(WEIGH_DELAY) / SUMCT(PAYMENTS) )
    on a formula variable. (In this case, the assumption is you have not static type-restricted the rows/cols) If you find any hinderances in the default approach, you may check this out as a formula & insert this at the cell editor level.
    If not, use a simple formula variable; here define the replacement path as 0(N) for your Payments. (N being the # of digits)
    Use a simple calculation:
    SUMGT(WD)/FV
    But you may not get an result o/p in the last row, as the values are not linked (sans relation with Payments). as it will return a X for the delay in the Result row.
    Pls. let me know know if this works or some sample o/p if the initial assumption was wrong.
    Thanks,
    Arun Bala

  • HT4061 I have question about my iphone4, I booth two years ago loked is any chance to get passworld to be factore unlok

    I have question about my iphone4, I booth two years ago loked is any chance to get passworld to be factore unlok?

    Hi I bought two years ago iphone 4 from usa AT & T locked version,  is there option to be factory unlocked.

  • Question about WebLogic query syntax

    Hello,
    I am using WebLogic Server 6.0, which came as part of the WebGain
    Studio SE 4.5 development kit. My question regards the Web Logic query
    syntax, which I have not yet mastered.
    I am trying to create a finder method that takes a single argument
    of type "char" and finds all matching fields of the column "keyword" in
    which the argument is the first letter of keyword. That is, if I were
    only looking for fields beginning with the letter "M", I'd use:
    (like keyword 'M%')
    However, I'm looking for all fields beginning with the first letter
    defined by the first argument. Sadly, this syntax:
    (like keyword '$0%')
    doesn't seem to be working. Any suggestions on the correct syntax?
    If this is not the right forum for this question, could someone
    suggest an appropriate newsgroup?
    Thanks, Dave

    962466 wrote:
    Hi all,
    I have an issue I need help with. I have created a script for an automated partition create on a monthly basis. It creates a monthly partition containing all dates within the respective month. The script is essentially this:
    ALTER TABLE SCHEMA.TABLE
    ADD PARTITION &&1
    VALUES LESS THAN (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    TABLESPACE LARGE_DATA94 COMPRESS;
    I continually get this error message "ORA-14019: partition bound element must be one of: string, datetime or interval literal, number, or MAXVALUE"
    The variable &&2 is passing in character data for the first of the month (E.G. '01-SEP-12'). &&1 passes character data for the month in MONYY (AUG12) I can run this query:
    select
    (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    from dual;
    With the output of 20120801. I cannot understand why I am able to run this partition create statement by hardcoding 20120901 but passing it in as a variable I receive the error. Note that I am not having problems with the &&1 variable. If anyone has any ideas please let me know. Thanks!I don't understand why you are taking a string, converting it to a date, then converting the date BACK TO a string ... then trying to convert that string to a number.
    What is the data type of the partitioning key? It appears that it is a NUMBER, but actually represents a DATE. If so, that is a fundamentally flawed design.

  • Questions about using Bitlocker without TPM

    We currently use Bitlocker to encrypt our Windows 7 computers with TPM. Now we are looking at encrypting some Windows 7 computers without a TPM. I see how to change the group policy setting to allow Bitlocker without a TPM. I have looked at a lot of other
    threads and I have a few questions about how the Bitlocker without TPM works.
    1) I see a USB drive containing a key is required for Bitlocker configurations without a TPM, say the end user loses this USB drive, what are the recovery options for their computer? 
    This article seems to indicate that without the USB drive connected, you are unable to even access recovery options http://blogs.technet.com/b/hugofe/archive/2010/10/29/bitlocker-without-tpm.aspx
    We have recovery backed up to AD when Bitlocker is enabled, but how could we do this recovery on a computer on computer where it's USB is lost? Would we have to remove the HD itself and attach it to another computer to access?
    2) After enabling Bitlocker on a computer without a TPM and using the USB Drive for the key, is there a way to also add a PIN or password protection at bootup?

    Hi,
    Sorry for my dilatory reply, 
    Configuring a startup key is another method to enable a higher level of security with the TPM. The startup key is a key stored on a USB flash drive, and the USB flash drive must be inserted every time the computer starts. The startup key is used to provide
    another factor of authentication in conjunction with TPM authentication. To use a USB flash drive as a startup key, the USB flash drive must be formatted by using the NTFS, FAT, or FAT32 file system.
    You must have a startup key to use BitLocker on a non-TPM computer.
    From: http://technet.microsoft.com/de-de/library/ee449438(v=ws.10).aspx#BKMK_Key
    For more Q&A about BitLocker, you can refer to the link above.
    hope this is helpful.
    Roger Lu
    TechNet Community Support

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Question about Rescheduling Start Date of a Task

    Question about Rescheduling Start Date of a Task
    I'm trying to determine whether the 'Reschedule' action is appropriate to my situation...
    I have a service that consists of 4 tasks.  The first 3 tasks will be completed immediately and then the request's 4th task will sit in a queue for about a month so that all of these requests can be grouped together and fulfilled during a few overnight work sessions.
    While the 4th task is waiting to be fulfilled, the technician will be contacting the requestor to schedule the work to be done sometime during a 3 day window.  The technician needs to specify which of the 3 days each request will be worked on.  I'm not sure if I should store the date in a service form field or have the technician reschedule the task so that the start date of the task is set to one of the 3 days.  If I use the reschedule feature, are there any downsides?
    The advantage of using the reschedule feature is that the scheduled start date can be displayed in ServiceManager's task list and can therefore be sorted on and queried.  This wouldn't be possible if I stored the date in a dictionary field on the service form.  In that case, I'd have to use custom reports to group the tasks by start date.
    Please let me know your thoughts...
    Thanks,
    Scott

    This strikes me as a very good use of this feature, since your need to to have the date for this task rescheduled/reflected in ServiceManager. This is the specific effect of using this feature.
    For the benefit of others reading this post, remember: this rescheduled date will not change the due date for the service.

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I want to question about the official service at the service center of Sony.

    I want to question about the official service at the service center of Sony.
    long since I like the models and items sony. from start playstation, cameras, camcorders up, I've ever had. and a new camera that I bought two years ie compact cameras Sony Cybershot DSC H200. as of a month ago, a camera was having problems in lenses that would not close. and setting the automatic mode to move by itself. I came to the Sony Service Center in Makassar, precisely on Jl. Shop Pengayomann A5 / 05 (0411) 442340.
    operator initially said only two weeks to work on my camera. but this week has been more dau even want to go in a month tomorrow, dated July 9, no news from the service center. and I kept the call to the office service. as well as assorted reasons. there are no spare parts or technical constraints, and the last one I call to his office, he said the factory spare part is damaged. imported directly from Singapore. I think, ko new spare part it can be damaged before using that? how the quality of this Sony spare part? ugly? not good? why?
    I was disappointed with this situation, where soon it will Eid, want to return home as well to Java. but the camera has not been settled workmanship?
    nah, roughly what is the solution of the Sony plagued with this problem? please help, because he did not know to whom to complain. operator had just said: it's up to the father alone.
    once again I asked for his help. solution. if you can before Eid arrived.
    Thank you,
    AD. Rusmianto

    Hi awwee107, 
    Welcome to the Sony Community! 
    We have forwarded your query to the relevant team for their further assistance and someone from local CC will contact you.
    Thanks!
     

  • Questions about OLE containers

    Hello,
    I try to use an OLE container for save any type of documents, the majority are Microsoft Word (*.doc), Acrobat Reader (*.pdf) and images (*.jpeg, *.jpg, *.bmp, ...)
    I prove to insert a document an save it in the database and all works fine. The document is saved in a BLOB column, and if I try to activate the OLE container I view the document correctly, but I have questions about OLE container:
    1.- Once I saved the document into the database (the icon of the document is shown into the OLE container), if I query the database to retrieve the documents, the OLE container not shown the icon of the document, and if I try to activate the OLE container, making double-click, it doesn't make anything.
    I think that the query to the database don't retrieve correctly the documents into the OLE container.
    2.- Once I saved the document into the database (the icon of the document is shown into the OLE container), if I try to activate the OLE container, depend the document I need to do twice double-click to open the document.
    If I try to open a Word document (*.doc) it need one double-click to activate, but if I try to open an Acrobat document (*.pdf) it need twice double-click to activate.
    Why? How can I open any type of documents with one double-click?
    3.- The form that I develop will work in client-server and in web mode.
    The problem is that if I try to run the form into web mode with OLE container, I have an error:
    "FRM-92100: Se ha interrumpido la conexión con el Servidor. Puede ser el resultado de un error de red o fallo en el Servidor. Debe reestablecer la conexión", and if I click in Details I have "Java Exception: java.lang.ArrayIndexOutOfBoundsException ...".
    If I delete the OLE item, it works fine, and I don't have any errors.
    I know that OLE container doesn't works in web mode, because this I will develop this functionality with JavaBean, but I would like that in client-server mode works with OLE container.
    There are any way to do this, that in web mode doesn't has this error, and in client-server mode works with OLE container?
    Thank you very much
    Jordi

    2. If you use Time Machine you can't browse those pictures on the Movable DIsk. It's not designed to work like that.
    3. Don't use copy and paste, try drag and drop instead.
    You don't tell us how you are managing these photos. I suggest that you use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the everything. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Question about delete statement

    I have question about delete statement...
    i am performing some simple delete statement against one table..but its taking so long..How can we check whether particular delete statements actually deleting records or not..?

    Is the associated select-statement returning rows or not?
    If yes -> delete is deleting
    If no -> delete is just using CPU-cycles
    To tune the delete-statement, you have to tune the corresponding select-statement. To tune the select-statement, you want to read the thread When your query takes too long ...

  • Question about autodiscover in case of multiple bound namespace

    Hi Experts,
    I have a question about the autodiscover behaviour. Let's assume we have the below infrastructure:
    SiteA :
    MBX-Server-SiteA : Member of a DAG
    CAS-Server-SiteA : outlook anywhere url = siteA.domain.com
    SiteB :
    MBX-Server-SiteB : Member of a DAG
    CAS-Server-SiteB-1 : outlook anywhere url = siteB-1.domain.com
    CAS-Server-SiteB-2: outlook anywhere url = siteB-2.domain.com
    We have DB-1 and DB-2 that have copies in both MBX servers.
    My question is how does exchange select the access URLs to return in the autodiscover process? I know that it depends on where the mailbox is hosted but can't find details about the process in the technet articles.
    Thanks.

    There's quite a few details that are involved in the Autodiscover process. First of all - probably the most important thing is that there are 2 stages to the whole process.
    In the first stage, the client is simply concerned with getting the address of a CAS server that will help it further. We'll keep things simple and assume your scenario where the client is located inside the network and is domain-joined. The details of the
    LDAP query are detailed in
    this link. (At the time I was investigating this I've actually went ahead and ran the queries using the ldp.exe client against the Configuration partition of the respective AD domain - it's worth seeing the actual responses.) An interesting trick here is
    the 'keywords' attribute that's stamped on those SCP entries. The reason behind it is that you don't want a client located in a site to go half across the globe in order to connect to a CAS server, when there's one available in its own site. One simple way
    to get the 'keywords' attribute stamped is through the Set-ClientAccessServer cmdlet, using the -AutodiscoverSiteScope parameter. In your example, you'd probably want to run it against the CAS server in Site A and specify the name of the corresponding AD site
    ('SiteA') and correspondingly against the 2 CAS servers in Site B (using 'SiteB'). Once the client has got the response to his query, it will attempt to select one server that's handling the site he's in (essentially it will filter the results based on 'keywords'
    -contains <client-site>). Now that we got our endpoint we can go to stage 2.
    In stage 2, the client will actually use EWS in order to query the Autodiscover service itself running on our target server. There are 2 possible interfaces of accessing the Autodiscover service: POX (Plain Old XML) and SOAP. POX will be targeting the ../Autodiscover.xml
    URLS, while the SOAP one will be using ../Autodiscover.svc URLs. Details about this including some hardcoded parts are
    here. What happens next is detailed in point 3, section 2.1 The Autodiscover Process
    here. This last link is the key to the whole process:
    "It provides a list of CAS that has AutodiscoverSiteScope information set for the
    Associated AD site of the Database where the client Mailbox is located."
    In other words, the CAS is smart enough to return the URLs belonging to a CAS server in the AD site where the client's mailbox' database is active.
    My advice is to test this on your scenario. Tests can be done here first-hand: the Outlook's tray icon Test E-Mail AutoConfiguration can be used or alternatively - if you want to see the details in the communication - SoapUI
    for the SOAP access method, for POX there's an extension called 'Postman for Chrome' that can be used. I've used all these in my tests back when I was fighting conflicting results from the articles around the web about Autodiscover.
    That's a long way of saying we get the AutoD URL of a CAS server closest to the workstation, which then provides the configuration to use which are the the URLs closest to the mailbox  :)
    By all means look at the SOAP response, but Outlook will only use POX.  Lync does SOAP along with other 3rd party apps.
    Cheers,
    Rhoderick
    Microsoft Senior Exchange PFE
    Blog:
    http://blogs.technet.com/rmilne 
    Twitter:   LinkedIn:
      Facebook:
      XING:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Maybe you are looking for

  • ISE 1.1/WLC 7.2 Wireless MAB and Profiling

    I am trying to set up wireless MAB with CWA so that when devices connect to the open guest network they are profiled and if they match a device type (iphone, android) they are allowed access to the internet without AUP or Authentication and all other

  • Restrict INVOIC Idoc to certain company code

    Hi, I am generating INVOIC Idocs in SAP system and distributing using ALE ...I have successfully configured the ALE settings and could trigger the IDOCs for all the Invoices in the system. Now my requirement is to restrict the generation of IDOC's on

  • HT4113 Can I password protect a photo album on my iPhone 5s?

    I want to password protect a photo album, can I do this?

  • To wait or not to wait for BB10 device with physical keyboard

    Hello everyone. I'm really psyched about BB10 but am debating whether or not to buy the touch screen device at launch or wait for a Bold-lie device. I really dislike the softkeyboard on other phones but I've read the BB10 softkeyboard is beyond other

  • Bridge CS3 Loupe Pixelation

    The loupe in Bridge can't focus on a close up at full res. It displays tiny pixels. I have 4GB RAM and thumbnails set @ 1000 MB in Prefs. Funny, I had no problem on a Mac with less RAM. Or is Leopard the problem? Help!