Convert logic in the application procedure by using connect by

Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production version

Hi all, Can someone please help me in building the query.
Basically, I wrote the logic in the procedure. I'm sure it can be converted into
a single application.

I'm trying to link the same person in the Group (family) using the ALIAS_NAMES

Example: in the first case where link_id = 2014709
Check in the table alias_name
JO = JOANN
JO = JOSEPH
JOANN! = JOSEPH
SO I cannt group together.

IN the second case
RON = RONALD
So we can combine these two people.



CREATE TABLE PEOPLE
(
  LINK_ID     NUMBER,
  LAST_NAME   VARCHAR2(60 BYTE),
  FIRST_NAME  VARCHAR2(50 BYTE),
  FLAG        NUMBER  -- tmp identifier to delete the records later
);

CREATE TABLE FLO.ALIAS_NAMES
(
  NICKNAME    VARCHAR2(30 BYTE),
  FIRST_NAME  VARCHAR2(30 BYTE)
);

SET DEFINE OFF;
Insert into PEOPLE
   (LINK_ID, LAST_NAME, FIRST_NAME, FLAG)
 Values
   (2014709, 'CRABTREE', 'JOSEPH', 1);
Insert into PEOPLE
   (LINK_ID, LAST_NAME, FIRST_NAME, FLAG)
 Values
   (2014709, 'CRABTREE', 'JO', 1);
Insert into PEOPLE
   (LINK_ID, LAST_NAME, FIRST_NAME, FLAG)
 Values
   (2014709, 'CRABTREE', 'JOANN', 1);
Insert into PEOPLE
   (LINK_ID, LAST_NAME, FIRST_NAME, FLAG)
 Values
   (6072, 'SIEVERS', 'RONALD', 1);
Insert into PEOPLE
   (LINK_ID, LAST_NAME, FIRST_NAME, FLAG)
 Values
   (6072, 'SIEVERS', 'RON', 1);
COMMIT;

SET DEFINE OFF;
Insert into ALIAS_NAMES
   (NICKNAME, FIRST_NAME)
 Values
   ('JO', 'JOANN');
Insert into ALIAS_NAMES
   (NICKNAME, FIRST_NAME)
 Values
   ('JO', 'JOSEPH');
Insert into ALIAS_NAMES
   (NICKNAME, FIRST_NAME)
 Values
   ('RON', 'RONALD');
COMMIT;
 -- Including The procudure which does the above mentioned logic 
 -- if possible can some one help me in converting the below mentiond procedure into
 -- query

CREATE OR REPLACE PROCEDURE Validate_on_Merge
IS
   v_count   NUMBER := 0;
BEGIN
   FOR I IN (SELECT   DISTINCT LINK_ID FROM PEOPLE)
   LOOP
      FOR J IN (  SELECT   *
                    FROM   PEOPLE
                   WHERE   LINK_ID = i.LINK_ID
                ORDER BY   LINK_ID,FIRST_NAME)
      LOOP
         FOR k
         IN (  SELECT   *
                 FROM   PEOPLE
                WHERE   LINK_ID = j.LINK_ID AND FIRST_NAME != j.FIRST_NAME
             ORDER BY   FIRST_NAME)
         LOOP
            dbms_output.put_line(k.link_id);
            SELECT   COUNT ( * )
              INTO   v_count
              FROM   ALIAS_NAMES
             WHERE   (FIRST_NAME = j.FIRST_NAME AND NICKNAME = k.FIRST_NAME)
                       OR (FIRST_NAME = k.FIRST_NAME AND NICKNAME = j.FIRST_NAME);
            IF v_count = 0
            THEN               
               UPDATE   PEOPLE
                  SET   FLag = 0                        -- Dont Merge this set
                WHERE   LINK_ID = j.LINK_ID;
               EXIT;
            END IF;
         END LOOP;

         IF v_count = 0
         THEN
            EXIT;
         END IF;
      END LOOP;
   END LOOP;
END;
Thank you

Published by: new learning on August 6, 2012 10:34

new learner wrote:
the final amount is correct, because as soon as I update all I leave the inner loop and the correcponding loop too;

Oops, I missed the EXIT. OK, so I think I understand now. Alias, I'm the first id name and link using loop variables you used in your procedure:

SQL> select  *
  2    from  people
  3    order by link_id
  4  /

   LINK_ID LAST_NAME  FIRST_NAME       FLAG
---------- ---------- ---------- ----------
      6072 SIEVERS    RONALD              1
      6072 SIEVERS    RON                 1
   2014709 CRABTREE   JOANN               1
   2014709 CRABTREE   JOSEPH              1
   2014709 CRABTREE   JO                  1

merge
  into people t1
  using (
         with t as (
                    -- get list of first name pairs within each link id.
                    -- there is no need to use != since it will produce
                    -- duplicate first name pairs (A,B) and (B,A). If in
                    -- pair (A,B) A matches nickname and B matches alias
                    -- first name or, A matches alias first name and B
                    -- matches nickname it is obvious so does pair (B,A)
                    -- same way if pair (A,B) does not match both
                    -- conditions so does pair (B,A). So outer left join
                    -- is our match indicator. Null alias indicates no
                    -- match.
                    select  p1.link_id j_link_id,
                            p1.first_name j_first_name,
                            p2.first_name k_first_name,
                            nvl2(a.nickname,1,0) flag
                      from       people p1
                            join
                                 people p2
                              on (
                                      p1.link_id = p2.link_id
                                  and
                                      p1.rowid > p2.rowid
                                 )
                            left join
                                 alias_names a
                              on (
                                     (
                                          p1.first_name = nickname
                                      and
                                          p2.first_name = a.first_name
                                     )
                                  or
                                     (
                                          p2.first_name = nickname
                                      and
                                          p1.first_name = a.first_name
                                     )
                                 )
                   )
         select  j_link_id link_id
           from  t
           group by j_link_id
           having min(flag) = 0
        ) t2
  on (
      t1.link_id = t2.link_id
     )
  when matched
    then
      update
         set flag = 0
/

3 rows merged.

SQL> select  *
  2    from  people
  3    order by link_id
  4  /

   LINK_ID LAST_NAME  FIRST_NAME       FLAG
---------- ---------- ---------- ----------
      6072 SIEVERS    RONALD              1
      6072 SIEVERS    RON                 1
   2014709 CRABTREE   JOANN               0
   2014709 CRABTREE   JOSEPH              0
   2014709 CRABTREE   JO                  0

SQL> 

SY.

Tags: Database

Similar Questions

  • What is the logic in the Application Builder

    Hi guys,.
    What is the logic in the application builder when you create a report for example. When we create a static report, we're going through these four steps:
    < ul >
    Display attributes
    Source
    Report attributes
    Conditional display < /ul >
    From the stage of 'Source', we can click on 'Create a report' and create the report...

    is there a table for each step... or there is a collection for each step. For example, when we click the button create collections are inserted into tables, then get emptied. ?????

    In my case, I have three real estate entities: owners, property and marketing. It goes like this:
    Enter the details of the owner, then click on create to go to the next page to enter the details of the property, then click on create to go to the next page to go into the details of marketing.

    I hope that my question is simple...

    Best regards
    Fateh

    Fateh says:
    Hi guys,.
    What is the logic in the application builder when you create a report for example. When we create a static report, we're going through these four steps:


      Display attributes
      Source
      Report attributes
      Conditional display

    From the stage of 'Source', we can click on 'Create a report' and create the report...

    is there a table for each step... or there is a collection for each step. For example, when we click the button create collections are inserted into tables, then get emptied. ?????

    In my case, I have three real estate entities: owners, property and marketing. It goes like this:
    Enter the details of the owner, then click on create to go to the next page to enter the details of the property, then click on create to go to the next page to go into the details of marketing.

    Who would be called a "Wizard" in the APEX (also frequently used in the Application Builder as you say). There is an 'Assistant' option when creating a new page that allows you to create and link the basic multiple page structure. Themes have "Assistant progress List" (horizontal) list templates (vertical orientation) and "Assistant list progression, horizontal Train' that can serve as indicators of progress of scene. You must build the content of each page using standard components. Once completed the "Wizard" there is nothing to indicate that the pages are linked logically, strangely, it generates a list of course assistant for you.

    Use Collections to store the data of intermediate stages before final treatment, if all the data is captured in a session. If you want persistence between sessions (e.g., allowing users to enter information over several days) use drafting/staging of the separate tables instead in more collections of capture data before final validation and promotion for the main tables.

  • I went to launch programs and got an error, a message "install you application seems to be damaged, please reinstall the application"-this message came for all the applications that I use regularly

    I went to use regular programs such as first today and hearing - at the launch I got the message error "installing your application appears to be damaged, please reinstall the application" - I CC application work fine until today? I don't know what to do

    Hi Sean

    Uninstall the creative cloud

    Run the CC cleaning tool: use of the Adobe Creative Cloud cleaning tool to solve installation problems

    Navigate to the OOBE folder.

    Windows: [system drive]: \Users\ [user name] \AppData\Local\Adobe\OOBE

    Mac OS: /users/folder/Library/Application Support / Adobe / OOBE

    Rename the file opm.db in opm_old.db

    Installation CC: DOWNLOAD Adobe Creative Cloud apps | CC free trial Adobe

    Try to open the Premier Pro or hearing.

    I hope this helps.

    Thank you

    Varun

  • The application effect Alpha using advanced Actions

    Hi all

    I'll explain what I'm trying to reach the first (I'm using Captivate 5)

    I have a wheel of food which is cut into portions (carbohydrates, proteins, produced slag etc.). Each part is actually a button ("party") which, once clicked evokes a text caption popup with some information with another ("narrow") button that will close the popup text caption.

    When the student clicks on the button 'part' I would also the context in which fade out, then when the user clicks on the button "Close", the context in which fade in the new.

    Using advanced actions, I see that I can apply an effect to all the objects in my background, so I'm trying to change all alphas to 20% when you click on the button 'part', then when you click on the "close" button back to 100% alpha values.

    However it seems that when the effect is applied (after clicking on the button ' Party'), it works on a timeline in which I can't seem to control and after a few seconds the effect returns return of 20% to 100% on its own.

    Is there a way I can apply the effect so that the alpha remains at 20% until I say otherwise?

    Would really appreciate anyones help with this. Thanks in advance

    Rick

    Hello

    Simple Simon here. Instead of futzing about with all the alphas on everything, why not just insert an object to display that covers everything? Set up black as the color and the alpha on that value. Then turn it or disable using advanced Actions.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • On the Sync Palm m500 using connection series with a dock under Windows 7

    Palm: m500

    Link: Serial (cradle)

    OS: Windows 7

    Problem: Palm Desktop 4.1.4 cannot be installed and does not synchronize Palm Desktop 6 using the serial connection.

    How can I synchronize the m500 using connection series with a version of PD under Windows 7?

    Nevermind, helped http://forum.brighthand.com/sync-windows-palm-os/261651-synching-legacy-pim-databases-palm-desktop-v-6-2-a.html .

  • AVI Converter to get the Codex suitable for use on first Elements 10

    This is my first time using first Elements 10. After several hours of wondering why my video production was causing my video clips of jerk flutters, etc... I was told that my video camera was not compatible to Adobes Elements 10 software.

    I was told that I could get a program on the internet that would allow me to convert my video to a certain Codex that Adobe could read.

    I am in great need of what I'm doing a production before the end of the month.

    My camera is a Canon ZR50 MC digital video camera. It uses the mini DV tapes and AVI format.

    Any help on this would be appreciated.

    Paul

    If you Capture from a cassette miniDV, via FireWire camera (a IEEE-1394 or iLink), pre, you don't need any other program. You don't convert anythiing, as PrE take the tape in a DV - AVI file.

    When you drag the Clips on the Timeline in a DV project (NTSC or PAL, depending on where you live and what your camera TV mode turned on), there should be no red line above the Clip.

    Now, if you add / change an effect, or add any form overlay, PiP, title, Transition, etc, red lines appearing above this Clip, or the part of the Clip, which is affected. It's normal.

    See this ARTICLE on the rendering.

    Good luck

    Hunt

  • How to stop the closure of the application when you use cmd - W in lightroom?

    For me and I think for most of the mac users it's automatic to use the command-w to close a window.

    It is annoying when it closes the entire application, because it takes a while to load my full catalog every time again.

    Is there a workaround or a solution to help out me?

    The workaround is to map a keystroke alternative to replace Cmd + W to close the window/app, that would then give Cmd + W to another use. More details on how to remap the strikes on Mac OSX 10.4 or 10.5 is located towards the middle of the next page http://www.computer-darkroom.com/lr2_keyboard/lightroom-keyboard.htm

  • How to delete a picture library "referenced" without deleting the original photos in the application which is used to compensate for my projects?

    I made the mistake of setting up Apple Photos on my Mac Pro using the library option "referenced" (which is where my computer file are not copied in the Photos). However, throughout the year, I started to do the 'projects' in pictures by which I copied some files of original photos in the Photos app. My library is now made up of a mixture of many referenced files and some originals copied into the app.

    Now I did some heavy reorganization and clean up the photos in my computer folder, but obviously none of these changes can be found in the photos referenced in the Photo app.

    My goal now is to started using iCloud Photos but I want to do with a clean slate (i.e. without using one of the current referenced library that I have pictures).

    I have two questions:

    (1) is there a way to Photos to delete ONLY the pictures that are files referenced and not the originals that are copied into the app?

    (2) if the above is not possible, then what happens to my projects if I simply delete all the photos I have in the app? I'll always be able to see the photos of the calendar, that I did for example?

    I'm afraid that if I delete my entire library I will not be able to access my projects more in the future. Does anyone have any suggestions on how I can manage this?

    Thank you very much.

    A

    You can consolidate all of the photos that are referenced. If you have used photos referenced in the projects (calendars, books), select the photo in your photo library and use the command "file > consolidate."  This will copy the original referenced in your photo library.

    To find all the files referenced requiring consolidation of create a smart album:

    File > new Smart Album

    Set the constraint for the album 'Photo is referenced.

    Now you have all the photo referenced in an album. You can select the photos in this album and either use ' file > consolidate "to copy in the library or press the ⌘⌫ key combination to delete the picture from the library.

    Before you consolidate or remove a photo referenced, using ' file > reveal in Finder ' to view the original file.  This way you can remove the copy on your disk after you have removed the photo from your photo library.  If the referenced file is left behind, pictures will not remove.

    If you want to use your photo library with iCloud photo library, it is essential to consolidate the pictures referenced, because referenced photos cannot download on iCloud photo library.

  • There is no pen menu in the application? Unable to connect...

    I have an iPad Pro ~ and already download applications Adobe Sketch & draw Adobe.

    But as the manual says to "Click the pen menu", I don't think any "pen menu" through the entire application, so I can't connect ink & Slide to the iPad...

    Could someone help? Thank you very much ~

    Ink and Slide is not supported on the iPad Pro.  You can go to ink & Slide Help | Ink and drag FAQ to see which devices are supported.

  • I get a message "error autorun.exe - application the application could not initialize properly (oxc0000135). Can someone please make all suggestions?.

    I am trying to install a game via a DVD and get a message "autorun.exe error - application that the application failed to initialize properly (oxc0000135) click on ok to close the application. I use Windows XP. Anyone would please any suggestions to fix this? Thank you kindly.

    Hi Matt,

    Thanks for the reply.

    I really apologize to provide suggestions evil as menitoned in above post about Windows 8.

    Method 1: I suggest you to consult and post the thread in the forum link and check if it helps.

    http://forums.CivFanatics.com/showthread.php?t=173648

    http://forums.CivFanatics.com/forumdisplay.php?f=144

    Method 2: If the problem persists, I suggest you to contact the game manufacturer for assistance.

    I hope this helps. If you have questions about Windows, I suggest you post in the Microsoft Community. We will be happy to help you.
  • Launch the application from a url in the browser for BlackBerry?

    I'm developing an application where I will launch a url in the browser where I run my application.

    Suppose if I click google.com , and then press enter, it will launch my app. For this, I tried with the HttpFilterRegistry API.

    For reference, I use the HTTPFilterDemo application. But currently while launching the application, I get the NullPointerException .

    I wrote the code below I have the openFilter method:

      public Connection openFilter( String name, int mode, boolean timeouts ) throws IOException
        {
            Logger.out("Protocol", "it is inside the openFilter method");
            _url = name.substring(2);
            _requestHeaders = new HttpHeaders();
            _responseHeaders = new HttpHeaders();
            _responseHeaders.setProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, "text/html");
    
            // Attempt to parse for the file name
            int slashIndex = name.indexOf('/', 2);
       if (_resultData == null)
            {
    
    final int modHandle = CodeModuleManager.getModuleHandle("AppLaunchBrowser");
                        Logger.out("Protocol", "here is the module handle:::" +modHandle);
                        final ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(modHandle);
    //                  final String[] arguments = new String[1];
                        final ApplicationDescriptor appDescriptor = new ApplicationDescriptor(apDes[0], new String[]{});
                        Logger.out("Protocol", "here is the app descriptor:::" +appDescriptor);
                        try {
                            final int appCode = ApplicationManager.getApplicationManager().runApplication(appDescriptor, true);
                            Logger.out("Protocol", "here is the app code:::" +appCode);
                        } catch (ApplicationManagerException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }
         }
            return this;
        }
    

    And I am creating alternative entry point in the application class and using as below:

    public class AppLaunch extends UiApplication{
        public static void main(String args[])
        {
            Logger.out("AppLaunch", args+"length of the arguments::::" +args.length);
            if((args != null) && (args.length > 0) && (args[0].equals("background")))
            {
                Logger.out("AppLaunch", "in the alternate entry point");
    //          Logger.out("AppLaunch", args+"length of the arguments::::" +args.length);
                HttpFilterRegistry.registerFilter("www.google.co.in", "com.innominds.ca", false);
    
            }
            else
            {
                Logger.out("AppLaunch", "Inside the Applaunch");
                AppLaunch theApp = new AppLaunch();
                theApp.requestForeground();
                Logger.out("AppLaunch", "created the app launch object");
                theApp.enterEventDispatcher();
    //          Logger.out("AppLaunch", "in the alternate entry point");
    //          HttpFilterRegistry.registerFilter("www.google.co.in", "com.innominds.ca", false);
            }
        }
    
        public AppLaunch()
        {
            checkPermissions();
            showTestScreen();
        }
    
         /**
         * This method showcases the ability to check the current permissions for
         * the application. If the permissions are insufficient, the user will be
         * prompted to increase the level of permissions. You may want to restrict
         * permissions for the ApplicationPermissionsDemo.cod module beforehand in
         * order to demonstrate this sample effectively. This can be done in
         * Options/Advanced Options/Applications/(menu)Modules.Highlight
         * 'ApplicationPermissionsDemo' in the Modules list and select 'Edit
         * Permissions' from the menu.
         */
        private void checkPermissions()
        {
    
            ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
            ApplicationPermissions original = apm.getApplicationPermissions();
    
            if(original.getPermission(ApplicationPermissions.PERMISSION_BROWSER_FILTER) == ApplicationPermissions.VALUE_ALLOW)
            {
                // All of the necessary permissions are currently available
                return;
            }
    
            ApplicationPermissions permRequest = new ApplicationPermissions();
            permRequest.addPermission(ApplicationPermissions.PERMISSION_BROWSER_FILTER);
    
            boolean acceptance = ApplicationPermissionsManager.getInstance().invokePermissionsRequest(permRequest);
    
            if(acceptance)
            {
                // User has accepted all of the permissions
                return;
            }
            else
            {
    
            }
        }
    
        /**
         * Shows the test screen to allow the user to exercise the application
         * permissions capabilities.
         */
        private void showTestScreen()
        {
            UiApplication.getUiApplication().pushScreen(new AppLaunchScreen());
        }
    }
    

    can someone please help... Sorry for the almost total code display...

    I was finally able to solve this problem. NPE is to come in other methods of recall because I'm implementation of the FilterBaseInterface.

  • Unable to return to the application: a UI - EUI: no face is detected

    Being on a specific in my application screen, when I use the application switcher function to switch to another application, I'm not able to go back to my request. The only output generated in the event log when you try to switch back is: a UI - EUI: no face is detected

    Here are the steps to reproduce the problem:

    1. I open my application (everything works fine)
    2. Switch to the application event log, using Application Switcher (assuming that the application event log is already open)
    3. clear the event log
    4. try to switch to my request, using Application Switcher->, after choosing my request, the application switcher function closes but I am still in the application event log
    5. refresh the event log
    6. the following output is generated: a UI - EUI: no face is detected

    The error only occurs on one modal screen, where I use a timer to display a countdown. What is the output "a UI - EUI: no face detected" mean? The cause of the problem would be that I'm using a timer or a modal screen?

    I'd appreciate any help!

    Only, I solved the problem. It had nothing to do with the output "EUI: no face detected '-j' have still not this release quite often for different applications. It seems to be a fairly common output.

    The question was on the screen, there's a single command, which results in a circular call (not obvious) to one of its own callers, which is of course very bad and ended in a ForcedStackTraceException. So it was simply not possible to return to the screen because the computer was tremendously busy (of course) until he was eventually suspended by the operating system.

    Thanks for the help anyway!

  • Monitor the application Oracle DB connection

    The Oracle cartridge can monitor the connection of the application of Oracle DB connection on each server?

    How is that possible?

    Depending on the type of applicatino, there may be a way to monitor this side application.

    You are running a server to something that exposes this information using JMX or Java applications? You run this with application .NET or something that can be exposed using WMI?

    Are the connections mapped on the process that we have?

    Golan

  • BlackBerry smartphones can not access the application Center

    When I downloaded the OS to 9100 pearl, I lost the ability to access my application Center. Tab to see he was there, but none of my applications appear. When I try to reset I get error 404.
    Any suggestions?

    Are you referring to "Application Center" or "App World"?
    If Application Center, so you can connect with TELUS and tell them that they can pull their webmaster (404 means that the Application Center tries to connect to a Web page on the TELUS Web site to pick up applications that TELUS wants you to use).

  • How to assign values to the application points to leave on a table

    Hello

    I have a FORM on a table with two or three elements. How to assign values to the elements of the application with the values in the elements of form, every time the value of the element is entry, change or page is sent?

    I created a dynamic action to the region level with Event - change to run the suite of PL/SQL, I tried with 3 different ways in PL/SQL, as shown below, but it didn't work.

    BEGIN

    : APP_FY: =: P1_FY;

    END;

    BEGIN

    APEX_UTIL. SET_SESSION_STATE ('APP_FY', v ('P1_FY'));

    : APP_FY: =: P1_FY;

    END;

    BEGIN

    APEX_UTIL. SET_SESSION_STATE ('APP_FY', v: P1_FY);

    END;

    Then I created an action dynamic at the ITEM level with change event to run the suite of PL/SQL and tried with PL/SQL, as shown below, but it didn't work.

    I need to assign values to the elements of the request form as these elements of the application will be used in many other pages in the application. How to I get there?

    Thank you.

    If a dynamic action of PL/SQL execution, you must send your list of page elements in the parameter "Elements of Page to submit.

    See the section 'run pl/sql' for this post.

    If the page is submitted, the elements of the page will be automatically set to session state, and you can have a page process make the code you have.

Maybe you are looking for

  • Changing the configuration of network domestic

    I use an Apple Time Capsule as a router with no problems until now. The current configuration is essentially: Cable modem | Time Capsule |         \ |         Wireless | Hard line CAT 5 of various devices We'll be moving soon however, and I want over

  • Please explain the connection points

    I am new to FCPX and I spent a lot of time searching for the answer to the following without success. What exactly are the "connection points"? I thought that if I moved to the location of a point of connection a video clip would begin at this new, b

  • HP Pavilion 500-210qe: hard drive problem

    Never before have I had a problem with a hard drive. I'll go along to watch Youtube plays a game and what ever and the hard drive with just stop working. The light that indicates the disk hard something it's been stuck on but when I arrived in Task M

  • Network AD - HOC detected on ipad 2 but access Internet No.

    I use a Windows Vista (Home Pre Version). I use a wired internet connection on my laptop & I want to share internet via wi - fi on my ipad. So for this I did the following -. 1. Add the Ad Hoc network using a WEP password and2. share the internet con

  • I am trying to speed up the performance of my pc.

    I have a laptop HD and am running Vista 32-bit Windows. I want to speed up the performance of my pc, because I am a student online and it takes a long time for my homework load.  Sometimes I even fall into the middle to complete my homework.  Is it p