Not getting do not parent group article

Hi all

I need help to select the parent group element by selecting a text within the element of group frame. Here's what I'm trying.

1. the search for a style of paragraph using script (note this paragraph always available within grouped style point)

2. Select the search text

3. with the help of code .parent to go to grouped point

Problem is when I'm targeting .parent point it's going to document instead of the group element. Please help me solve this problem.

Thank you

Shonky

Hello

Everything depends on how you target a parent:

Text.parent (history) .parent ==> document

text.parentTextFrames [0] (textFrame) .parent ==> can be a Group if grouped.

Jarek

Tags: InDesign

Similar Questions

  • Listagg function gives ORA-00979: not a GROUP BY expression error

    Hello

    I have an environment that supports the Listagg function. Suite works perfectly:

    Select task_code, LISTAGG(ename||) e ('| role |') (',',') WITHIN GROUP (ORDER BY ename) as employees

    team

    where task_code = '01.07.05'

    Task_code group

    However, this is just a test request, the real is a little wider and I can't get the function works, I get ORA-00979: not a GROUP BY expression error.

    Here's my query (the column names are in Dutch, but that shouldn't really be a problem):

    SELECT distinct op_sod.sod_code, op_sod.sod_omschr_lang, op_ood.ood_code, op_ood.ood_omschr_lang, op_activiteit.act_code, op_activiteit.act_omschr_lang, op_taak.taak_code, op_taak.taak_omschr_lang, op_afdeling___master.afd_code, op_taak.belmo, op_taak_j.planning_la,

    LISTAGG (op_ploeg.wn_naam |) ' ('| op_ploeg.rol |') (',',') WITHIN GROUP (ORDER BY op_ploeg.wn_naam) as employees.

    "Write subtaak/mijlpaal toe."

    op_teamplanning.subtaak_mijlpaal as subtaak_of_mijlpaal,

    op_teamplanning.subtaak_omschr | -case when op_teamplanning.subtaak_mijlpaal = 'BELMO Mijlpaal' then ' (BRUNO mijlpaalnr: ' | nvl (op_teamplanning.nummer, 0) |) ')' other ' ' end

    as subtaak_mijlpaal_omschrijving, op_teamplanning.deadline as date limit, op_teamplanning.status as status,

    trim (both

    case when op_teamplanning.vlag1 = 'Geen' and op_teamplanning.vlag2 = 'Geen' and op_teamplanning.vlag3 = 'Geen' and op_teamplanning.vlag4 = 'Geen'

    and op_teamplanning.vlag5 = 'Geen' or op_teamplanning.vlag1 is null and op_teamplanning.vlag2 is null and op_teamplanning.vlag3 is null

    op_teamplanning.vlag5 is null and op_teamplanning.vlag4 is null then 'Geen '.

    Another pad (both case when op_teamplanning.vlag1 = 'Geen' then "else trim (both from op_teamplanning.vlag1) end) |

    trim (both case when op_teamplanning.vlag2 = 'Geen' then "another ',' | trim (both from op_teamplanning.vlag2) end) |

    trim (both case when op_teamplanning.vlag3 = 'Geen' then "another ',' | trim (both from op_teamplanning.vlag3) end) |

    trim (both case when op_teamplanning.vlag4 = 'Geen' then "another ',' | trim (both from op_teamplanning.vlag4) end) |

    trim (both case when op_teamplanning.vlag5 = 'Geen' then "another ',' | trim (both from op_teamplanning.vlag5) end) end) as Beleidsvlaggen,

    op_teamplanning.naam_verantw as quotation, op_teamplanning.subtaak_id as subtaak_id, nvl (op_teamplanning.nummer, 0) as Nummer, nvl (op_teamplanning.regelgevingsagenda, 'Nee') as

    Regelgeving, op_teamplan_subsubtaak.subsubtaak_submijlpaal as subsubtaak_submijlpaal, op_teamplan_subsubtaak.subsubtaak_id as subsubtaak_id, op_teamplan_subsubtaak.subsubtaak_omschr

    like subsubtaak_omschr, op_teamplan_subsubtaak.deadline, sub_deadline, op_teamplan_subsubtaak.status as sub_status, op_teamplan_subsubtaak.naam_verantw as naam_verantw

    Of...

    WHERE THE...

    Group of op_sod.sod_code, op_sod.sod_omschr_lang, op_ood.ood_code, op_ood.ood_omschr_lang, op_activiteit.act_code, op_activiteit.act_omschr_lang, op_taak.taak_code, op_taak.taak_omschr_lang, op_afdeling___master.afd_code, op_taak.belmo, op_taak_j.planning_la


    Can someone tell me the reason for this error?

    Thanks in advance!

    Kind regards

    NDG

    NDG123 wrote:

    I don't really understand your other question:

    Is below for example, a group of expression?

    op_teamplanning.subtaak_mijlpaal

    After some additional research:

    The group by mistake is not appear anymore when I delete all fields after the listagg field, that might be a clue to the solution.

    It is not difficult to understand. You can have other columns not aggregated in your projection on the side of those listed in the group by expression.

    The reason for ORA-01489 is that the resulting string will become long and exceeds 4000 bytes.

    You will find several solution in this forum.

    For example

    Re: Listagg function excdding 4000 characters

  • error: not a GROUP BY expression

    Hello world

    Looks like I need some help here... :) don't know what that means, but im getting this message
    00979 00000 - "not a GROUP BY expression"
    * Cause:
    * Action:
    Error on line: column 137: 36

    It's the function:

    function get_path (materialID in number, materialTypeID number, inTopFolderID number default null, inMaterialFolderID in the number default null, webMode in default number 1 in)
    return varchar2;


    and im using it on my query

    , (select material_util.get_path (m.material_id, 8, 1021695, min (mf.)) (IP_MATERIALFOLDERID), 1).
    material m, materialfolder mf
    where mf.nfx_link = m.MATERIAL_ID
    and t.template_id = m.template_id) as path

    It seems that min (mf. IP_MATERIALFOLDERID) is having some problems here... don't know why...

    Let me know guys...

    Thank you...

    J

    Read below for informative post from Frank Kulash on ABC in the group by clause
    {message: id = 9969583}

  • Not a GROUP BY clause error

    Hi all

    Can someone tell me what is wrong with the query below? I get an exception is NOT a GROUP OF CLAUSE:
    SELECT
            LAST_DAY((xxx.timevalue)) as  SUMMARYDATE
          , xxx.acct AS ACCTNUM
          , xxx.referenceid AS SEARCHTYPE
           , CASE WHEN NVL(xxx.PRIMARYSRCH_IND,'N') = 'Y' THEN COUNT(xxx.searchid) ELSE 0 END  Cnt_PrimarySearches
                   , CASE WHEN NVL(xxx.primarysrch_ind,'N') = 'N' THEN COUNT(xxx.Searchid) ELSE 0 END  Cnt_SecondarySearches
         
          FROM XXX_Tablename xxx
          WHERE
           xxx.referenceid NOT IN ('Alert','Search','Collection')
          GROUP BY
      LAST_DAY((xxx.timevalue))  
      , xxx.acctnum
      , xxx.referenceid 

    Hello

    Try this

    SELECT
            LAST_DAY((xxx.timevalue)) as  SUMMARYDATE
          , xxx.acct AS ACCTNUM
          , xxx.referenceid AS SEARCHTYPE
           ,COUNT( CASE WHEN NVL(xxx.PRIMARYSRCH_IND,'N') = 'Y' THEN (xxx.searchid) ELSE 0 END  Cnt_PrimarySearches)
                   , COUNT(CASE WHEN NVL(xxx.primarysrch_ind,'N') = 'N' THEN (xxx.Searchid) ELSE 0 END) Cnt_SecondarySearches
    
          FROM XXX_Tablename xxx
          WHERE
           xxx.referenceid NOT IN ('Alert','Search','Collection')
          GROUP BY
      LAST_DAY((xxx.timevalue))
      , xxx.acctnum
      , xxx.referenceid
    

    Not tested

  • Apple Watch: can I receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please. Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... someone kn

    I can receive all messages from whatsapp on my Apple Watch, but not the Group whatsapp messages, don't know why... Help, please.

    Besides, my watch is custom in Spanish, but only answer messages Whatsapp understands English... anyone know why? Thanks to you all!

    Hello

    To change the language for a response on your watch: Press answer > firmly press the screen > press on choose language > select Spanish.

  • in Outlook Express, how can I send the same message to a group important (in the address book already), but have to each recipient can only see his name (not the Group)

    In Outlook Express, how can I send the same message to the large group (already in the address book), but have to each recipient can only see his name (not the Group)?

    To use the functionality of the BCC (Blind Carbon Copy), in a new message window, click View | All headers and type the addresses separated by a; Or: Click the button to. You will see your list of contacts and the choice to put them in the To, CC, or BCC field. Click on an address, and then click BCC to add it. Repeat for all of the contacts you want. (Note: most of the providers have limits as to how many messages you can send both a. 25 is common, but it varies).

    Put your own address in the box to. That's the only name/address that any recipient will see. If you leave the field empty, some people may not receive e-mail because of message rules they put in place, or restrictions imposed by their ISP.

    You can also make an entry in the address book using your e-mail address, but put something like the mailing list in the area of the display.

    *********************

    You can also create groups if you send e-mail to the same people often.

    To create a group of contacts:

    You can create a single group name (or alias) to use when sending a message to several contacts at the same time. Just create a group name and add individual contacts to the group. Then just type the name of the group in the box for when you send mail.

    1. in the address book, select the folder in which you want to create a group. Click New in the toolbar, and then click New Group.
    2. the Properties dialog box opens. In the group name box, type the name of the group.
    3. There are several ways to add people to the Group:
    a. to add a person from your address book list, click Select members, and then click a name in the address book list.
    (b) to add a person directly to the group without adding the name to your address book, type the person's name and e-mail address at the bottom of the Properties dialog box and then click Add.
    to add a person to both the Group and your address book, click New Contact and enter the appropriate information.
    (d) to use a directory service, click Select members, and then click search. Select a directory service in the drop-down list at the end of the text box. After finding and selecting an address, it is automatically added to your address book.
    4. Repeat for each addition until your group is defined.

    Note

    a. to view a list of your groups separately from the list of address book in the address book on the view menu, make sure that folders and groups is selected.
     
    b. you can create multiple groups, and contacts can belong to several groups.

    If you want to send to a group without addresses are displayed for each recipient, open the address book and make a new entry. Enter the name of the group in the area of the display, but use your address. (Some Internet service providers require a legitimate address in the line to and recipients will know it's from the Group).

    Click on the button to. Enter the name of the group using your address. Enter the group in the BCC field.

  • Error message after trying and do not access the Article, press release or Social Bookmarking sites from the newly installed software.

    The message below appears, after having tried and do not access the Article, release press, or Social Bookmarking sites; Since the software newly installed.

    ((Accès àle chemin c:\Program Files (x86) Dotcom Marketing / Auto System X references xml traffic is denied.))

    Does anyone know how to overcome this problem.

    Original title: Error Message

    "since the newly installed software? What software? Have you checked the manufacturer's website to see if they have a solution?

  • SQL error: ORA-00979: not a GROUP BY

    Hi team,

    I am trying to execute the query

    SELECT DISTINCT comp.company_name |' -' || COMP.contract_number AS 'company_name '.

    , UPPER (bh.first_name) AS 'budget_holder '.

    , INITCAP (sup.first_name) |' -' || SUP. Surname AS 'supervisor '.

    , INITCAP (emp.status) AS "Department".

    , INITCAP (emp.first_name |) » '|| EMP. Surname) AS "employee."

    r.employee_id

    , emp.paaf_number AS 'paaf_num '.

    , emp.employee_payroll_number AS 'payroll_num '.

    , emp.discipline AS 'discipline '.

    , NVL (SUM (tg.week_day1), 0) AS "day 1".

    , NVL (SUM (tg.week_day2), 0) AS "day 2".

    , NVL (SUM (tg.week_day3), 0) AS day '3 '.

    , NVL (SUM (tg.week_day4), 0) AS "day4.

    , NVL (SUM (tg.week_day5), 0) AS "day5".

    , NVL (SUM (tg.week_day6), 0) AS "day6.

    , NVL (SUM (tg.week_day7), 0) AS "day 7".

    r.valid_from

    r.valid_to

    Tw_roster_data r

    JOIN tw_employee emp

    ON emp.employee_id = r.employee_id

    JOIN tg tw_timesheet_stage

    ON tg.employee_id = r.employee_id

    AND tg.week_commencing = r.valid_from

    JOIN the tw_contracting_company comp

    ON comp.contracting_company_id = r.contracting_company_id

    JOIN tw_supervisor sup

    ON sup.supervisor_id = tg.supervisor_id

    JOIN tw_budget_holder bh

    ON bh.budget_holder_id = sup.budget_holder_id

    WHERE r.contracting_company_id = 101

    AND r.VALID_FROM = January 31, 2015.

    AND r.VALID_TO = February 6, 2015"

    Group of r.employee_id, comp.company_name, bh.first_name,

    EMP.paaf_number, emp.employee_payroll_number, emp.discipline,

    r.valid_from, r.valid_to;

    But still the error below

    Error in the command line: 1 column: 17

    Error report-

    SQL error: ORA-00979: not a GROUP BY expression

    00979 00000 - "not a GROUP BY expression"

    Can help.

    Hello

    When to use analytical function oracle other columns used based on the analysis, must be included in the GROUP BY Clause

    SELECT expression1, expression2, ... expression_n,
      aggregate_function (expression)
    FROM tables
    WHERE conditions
    GROUP BY expression1, expression2, ... expression_n;
    

    SQL 101: Seen are medium and other aggregate data

      SELECT DISTINCT
             comp.company_name || ' - ' || comp.contract_number AS "company_name",
             UPPER (bh.first_name) AS "budget_holder",
             INITCAP (sup.first_name) || ' - ' || sup.surname AS "supervisor",
             INITCAP (emp.status) AS "department",
             INITCAP (emp.first_name || ' ' || emp.surname) AS "employee",
             r.employee_id,
             emp.paaf_number AS "paaf_num",
             emp.employee_payroll_number AS "payroll_num",
             emp.discipline AS "discipline",
             NVL (SUM (tg.week_day1), 0) AS "day1",
             NVL (SUM (tg.week_day2), 0) AS "day2",
             NVL (SUM (tg.week_day3), 0) AS "day3",
             NVL (SUM (tg.week_day4), 0) AS "day4",
             NVL (SUM (tg.week_day5), 0) AS "day5",
             NVL (SUM (tg.week_day6), 0) AS "day6",
             NVL (SUM (tg.week_day7), 0) AS "day7",
             r.valid_from,
             r.valid_to
        FROM tw_roster_data r
             JOIN tw_employee emp
                ON emp.employee_id = r.employee_id
             JOIN tw_timesheet_stage tg
                ON tg.employee_id = r.employee_id
                   AND tg.week_commencing = r.valid_from
             JOIN tw_contracting_company comp
                ON comp.contracting_company_id = r.contracting_company_id
             JOIN tw_supervisor sup
                ON sup.supervisor_id = tg.supervisor_id
             JOIN tw_budget_holder bh
                ON bh.budget_holder_id = sup.budget_holder_id
       WHERE     r.contracting_company_id = 101
             AND r.VALID_FROM = '31-JAN-2015'
             AND r.VALID_TO = '06-FEB-2015'
    GROUP BY
    comp.contract_number
    ,comp.company_name
    ,bh.first_name
    ,sup.first_name
    ,sup.surname
    , emp.status
    ,emp.first_name
    ,emp.surname
    r.employee_id,
    emp.paaf_number,
    emp.employee_payroll_number,
    emp.discipline,
     r.valid_from,
     r.valid_to;
    
  • SQL - ORA-00979: not a GROUP BY expression

    Hi Expert,

    I received the error message: ORA-00979: not a GROUP BY expression at the bottom of the sql statement

    Please advise - display total number of point of sale and the total amount of all items. Only display results when the total quantity is greater than 2.

    SELECT o.Qty, sum(o.Qty*o.salesprice) AS TOTALDOLLARS, description and i.Itemcode
    OF ORDERLINE o
    INNER JOIN POINT I
    ON o.itemcode = i.itemcode
    GROUP BY i.Itemcode
    After having o.qty > 2

    > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

    Create table ORDERLINE
    (
    Qty number 4,
    Salesprice Number (6.2),
    OrderNo Number (3).
    ItemCode Varchar2 (6).
    Primary key (OrderNo, Itemcode)
    Foreign Key (Itemcode) refers to POINT.
    Foreign Key (OrderNo) made reference SALESORDER


    Create table POINT
    (
    ItemCode Varchar2 (6).
    Description Varchar2 (50).
    Retailprice Number (6.2),
    Number of weight (4.1),
    Purchaseprice Number (6.2),
    Category Varchar2 (20).
    Primary Key (Itemcode)
    );

    Hi 845720,

    Based on the sql code, the sum must be grouped itemcodewise, descriptionwise, qtywise.
    This means that you have all these in a group by clause too with sum().

    eg : group by  i.Itemcode, i.Description, o.Qty
    

    Is this wise sum qty is logical? I do not know...

    It will be useful,
    CKLP

    Published by: CKLP April 14, 2011 22:10

  • Subquery in the select clause and not "a group by expression" error.

    Hi all
    I hope someone out there can help me out with this one. I have a sql query that performs a subquery in the select case combined with an aggregate function and gives me a "not a group by expression.

    I created a simplified example
     SELECT COUNT(*)                     ,
      ai.invoice_num invoice_number      ,
      ai.description invoice_description ,
      (SELECT poh.po_header_id
           FROM po_headers poh ,
          po_distributions pod
          WHERE pod.po_distribution_id = aid.po_distribution_id
        AND pod.po_header_id           = poh.po_header_id
        ) po_number
         FROM ap_invoice_distributions aid ,
        ap_invoices ai
        WHERE ai.invoice_id = 1476932
      AND aid.project_id    = 8608   
      AND aid.task_id       = 462202  
      AND ai.invoice_id     = aid.invoice_id
     GROUP BY ai.invoice_num,
                    ai.description;
    I'm sure he expected me to add the po_number to the group by clause, but this does not work and gives the error "invalid identifier".

    Can someone suggest a way for a new concert the query so that I can add po_number to my education by clause.

    Kris

    You should try either:

    SELECT COUNT (*),
    AI.invoice_num invoice_number,
    have. Description invoice_description,
    (SELECT poh.po_header_id
    OF po_headers poh,.
    pod po_distributions
    WHERE pod.po_distribution_id = aid.po_distribution_id
    AND pod.po_header_id = poh.po_header_id
    ) po_number
    HELP ap_invoice_distributions.
    ap_invoices AI
    WHERE ai.invoice_id = 1476932
    AND aid.project_id = 8608
    AND aid.task_id = 462202
    AND ai.invoice_id = aid.invoice_id
    Ai.invoice_num GROUP,
    have. Description, aid.po_distribution_id;

    or

    SELECT COUNT (*),
    AI.invoice_num invoice_number,
    have. Description invoice_description,
    MAX ((SELECT poh.po_header_id
    OF po_headers poh,.
    pod po_distributions
    WHERE pod.po_distribution_id = aid.po_distribution_id
    AND pod.po_header_id = poh.po_header_id
    po_number))
    HELP ap_invoice_distributions.
    ap_invoices AI
    WHERE ai.invoice_id = 1476932
    AND aid.project_id = 8608
    AND aid.task_id = 462202
    AND ai.invoice_id = aid.invoice_id
    Ai.invoice_num GROUP,
    have. Description;

  • Get rid of Parental control on my guest account

    Why can't get rid of parental control on my guest account!  It is said you can not set up parental controls for the guest account and yet when I try to connect it throws up of all these parental controls!  I watched & tried and tried again to fix it.  Very frustrated here, especially with guests coming for the holidays! I just set up a password for the guest account...

    Hello

    See this and the 'related links' here and I hope that you find the answer. You may need to remove
    all parental controls and try again. You have Ultimate or business where group policies would come
    in game (GPEdit)?

    How to install and use Parental controls in Vista
    http://www.Vistax64.com/tutorials/95139-parental-controls-Setup-use.html

    and these:

    Setting up Windows Vista's Parental control
    http://www.bleepingcomputer.com/tutorials/tutorial139.html

    Set up Parental controls
    http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-parental-controls

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • When you access microsoft technical support, I get a message that the article applies to windows vista and head to the support of windows xp. However, I have installed professional vista

    Microsoft support see my installed OS windows XP. When, in fact, I have Vista for businesses. So that when I click on an article I get a message that the article does not apply to me and that I should see windows xp support

    If you don't mind, double check what Windows do you really.

    If you do not have Vista... Start > computer > toolbar, System Properties > what does say under Windows edition?

    t-4-2

  • How to get rid of repeat groups using the query? Its my sql script.

    Mr President.

    worm of Oracle's 10g express edition

    I want to get rid of repeating groups and wants to get result like

    1. 1 RAM null 200 222,0
    2. DVD Player 2 25 34.0
    3. 3 HDD 160 GB Satta 40 49.0
    4. 4 LCD 19\ monitor"20 28.0
    5. 5 color 10 18,0 HP printer
    6. 6 keyboard multimedia keyboard 50 69.0
    7. 7 custom mouse mouse 150 248,0

    If my table script is as below

    BEGIN
           
     -- drop tables 
      EXECUTE IMMEDIATE 'DROP TABLE CUSTOMER';   
      EXECUTE IMMEDIATE 'DROP TABLE PRODUCT';   
      EXECUTE IMMEDIATE 'DROP TABLE SUPPLIER';   
      EXECUTE IMMEDIATE 'DROP TABLE PURCHASE';   
      EXECUTE IMMEDIATE 'DROP TABLE PURCHASELINE';   
      EXECUTE IMMEDIATE 'DROP TABLE SALES';   
      EXECUTE IMMEDIATE 'DROP TABLE SALESLINE';
      EXECUTE IMMEDIATE 'DROP TABLE STOCK';
      
    EXCEPTION
      WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('');
    END;
    /
    
    
    CREATE TABLE CUSTOMER 
    (
      cust_id NUMBER        NOT NULL
    , name VARCHAR2(50)  NOT NULL
    , address VARCHAR2(100) DEFAULT NULL
    , contactno VARCHAR2(20)  DEFAULT NULL
    , CONSTRAINT CUSTOMER_PK PRIMARY KEY 
      (
        cust_id
      )
      ENABLE 
    );  
    
    
    CREATE TABLE PRODUCT 
    (
      prod_id   NUMBER       NOT NULL
    , name   VARCHAR2(50) NOT NULL
    , description VARCHAR2(50) DEFAULT NULL
    , CONSTRAINT PRODUCT_PK PRIMARY KEY 
      (
        prod_id
      )
      ENABLE 
    );  
    CREATE TABLE SUPPLIER 
    (
      suplr_id   NUMBER        NOT NULL
    , name   VARCHAR2(50)  NOT NULL
    , address VARCHAR2(100) DEFAULT NULL
    , contactno VARCHAR2(20)  DEFAULT NULL
    , CONSTRAINT SUPPLIER_PK PRIMARY KEY 
      (
        suplr_id
      )
      ENABLE 
    );  
    
    
    CREATE TABLE PURCHASE (
      pur_id NUMBER NOT NULL
    , pur_date DATE   NOT NULL  
    , suplr_id NUMBER DEFAULT '0'
    , CONSTRAINT PUR_SUPLR_FK FOREIGN KEY 
      (
      suplr_id
      )
      REFERENCES SUPPLIER 
      (
      suplr_id
      )
    , CONSTRAINT PURCHASE_PK PRIMARY KEY 
      (
        pur_id
      )
      ENABLE 
    );  
    
    
    CREATE TABLE PURCHASELINE (
      pur_id NUMBER DEFAULT '0' NOT NULL
    , prod_id NUMBER DEFAULT '0' NOT NULL
    , pur_qty NUMBER DEFAULT '0' NOT NULL
    , unit_pur_price NUMBER DEFAULT '0' NOT NULL
    , CONSTRAINT PUR_LINE_PUR_FK FOREIGN KEY 
      (
      pur_id
      )
      REFERENCES PURCHASE
      (
      pur_id
      )
    , CONSTRAINT PUR_LINE_POD_FK FOREIGN KEY
      (
        prod_id
      )
      REFERENCES PRODUCT
      (
      prod_id
      )
    , CONSTRAINT PUR_LINE_PK PRIMARY KEY 
      (
        pur_id,prod_id
      )
      ENABLE 
    );  
    
    
    CREATE TABLE SALES (
      sal_id NUMBER NOT NULL
    , sal_date DATE   DEFAULT NULL  
    , cust_id NUMBER DEFAULT '0'
    , CONSTRAINT PUR_CUSTR_FK FOREIGN KEY 
      (
      cust_id
      )
      REFERENCES CUSTOMER
      (
      cust_id
      )
    , CONSTRAINT SALES_PK PRIMARY KEY 
      (
        sal_id
      )
      ENABLE 
    );  
    
    
    CREATE TABLE SALESLINE (
      sal_id NUMBER DEFAULT '0' NOT NULL
    , prod_id NUMBER DEFAULT '0' NOT NULL
    , sal_qty NUMBER DEFAULT '0' NOT NULL
    , unit_sal_price NUMBER DEFAULT '0' NOT NULL
    , CONSTRAINT SAL_LINE_SAL_FK FOREIGN KEY 
      (
      sal_id
      )
      REFERENCES SALES
      (
      sal_id
      )
    , CONSTRAINT SAL_LINE_POD_FK FOREIGN KEY
      (
        prod_id
      )
      REFERENCES PRODUCT
      (
      prod_id
      )
    , CONSTRAINT SAL_LINE_PK PRIMARY KEY 
      (
        sal_id,prod_id
      )
      ENABLE 
    ); 
    
    
    CREATE TABLE STOCK (
      prod_id NUMBER NOT NULL
    , prod_qty NUMBER DEFAULT '0' NOT NULL
    , re_ord_level NUMBER DEFAULT '0' NOT NULL
    , CONSTRAINT STOCK_POD_FK FOREIGN KEY
      (
        prod_id
      )
      REFERENCES PRODUCT
      (
      prod_id
      )
    , CONSTRAINT STOCK_PK PRIMARY KEY 
      (
        prod_id
      )
      ENABLE 
    );   
    
    
    
    
    SET DEFINE OFF;
    
    
    -- ***** Populate Tables *****
    
    
    
    
    --CUSTOMER table data
    
    
    INSERT INTO CUSTOMER VALUES(1,'Kamrul Hasan','Moghbazar, Dhaka','0456789123');
    INSERT INTO CUSTOMER VALUES(2,'Rabiul Alam','Motijheel, Dhaka','0567891234');
    INSERT INTO CUSTOMER VALUES(3,'Shahed Hasan','2-G/1,2-2,Mirpur, Dhaka','0678912345');
    
    
    --PRODUCT table data
    
    
    INSERT INTO PRODUCT VALUES(1,'RAM',NULL);
    INSERT INTO PRODUCT VALUES(2,'DVD Drive',NULL);
    INSERT INTO PRODUCT VALUES(3,'HDD','160 GB Satta');
    INSERT INTO PRODUCT VALUES(4,'Monitor','LCD 19\"');
    INSERT INTO PRODUCT VALUES(5,'Printer','HP Color');
    INSERT INTO PRODUCT VALUES(6,'Keyboard','Multimedia Keyborad (Customised)');
    INSERT INTO PRODUCT VALUES(7,'Mouse','Customised Mouse');
    
    
    -- SUPPLIER table data
    
    
    INSERT INTO SUPPLIER VALUES(1,'Salam Enterprise','2-H/1-10, Mirpur, Dhaka, Bangladesh','0123456789');
    INSERT INTO SUPPLIER VALUES(2,'ABC Supplies','Dhanmondi, Dhaka','0234567891');
    INSERT INTO SUPPLIER VALUES(3,'XYZ Company','52 Gabtali, Dhaka','0345678912');
    
    
    
    
    --PURCHASE table data
    
    
    INSERT INTO PURCHASE VALUES(1,TO_DATE('12-12-2007','dd-mm-yyyy'),1);
    INSERT INTO PURCHASE VALUES(2,TO_DATE('13-12-2007','dd-mm-yyyy'),2);
    INSERT INTO PURCHASE VALUES(3,TO_DATE('13-12-2007','dd-mm-yyyy'),1);
    INSERT INTO PURCHASE VALUES(4,TO_DATE('14-12-2007','dd-mm-yyyy'),1);
    INSERT INTO PURCHASE VALUES(5,TO_DATE('15-12-2007','dd-mm-yyyy'),2);
    INSERT INTO PURCHASE VALUES(6,TO_DATE('20-12-2007','dd-mm-yyyy'),3);
    INSERT INTO PURCHASE VALUES(7,TO_DATE('05-01-2007','dd-mm-yyyy'),2);
    INSERT INTO PURCHASE VALUES(8,TO_DATE('06-05-2007','dd-mm-yyyy'),3);
    INSERT INTO PURCHASE VALUES(9,TO_DATE('15-07-2008','dd-mm-yyyy'),1);
       
    
    
    --PURCHASELINE table data
    INSERT INTO PURCHASELINE VALUES(1,1,25,900);
    INSERT INTO PURCHASELINE VALUES(1,2,10,1700);
    INSERT INTO PURCHASELINE VALUES(1,3,10,5000);
    INSERT INTO PURCHASELINE VALUES(1,4,9,5500);
    INSERT INTO PURCHASELINE VALUES(1,7,100,250);
    INSERT INTO PURCHASELINE VALUES(2,3,15,5000);
    INSERT INTO PURCHASELINE VALUES(2,6,20,500);
    INSERT INTO PURCHASELINE VALUES(3,6,25,450);  
    INSERT INTO PURCHASELINE VALUES(4,7,100,200);  
    INSERT INTO PURCHASELINE VALUES(5,5,10,3450);  
    INSERT INTO PURCHASELINE VALUES(5,6,10,180);  
    INSERT INTO PURCHASELINE VALUES(6,1,15,900); 
    
    
    
    
    --SALES table data
    INSERT INTO SALES VALUES(1,TO_DATE('12-12-2007','dd-mm-yyyy'),2); 
    INSERT INTO SALES VALUES(2,TO_DATE('15-12-2007','dd-mm-yyyy'),3);
    INSERT INTO SALES VALUES(3,TO_DATE('20-12-2007','dd-mm-yyyy'),2);
    INSERT INTO SALES VALUES(4,TO_DATE('28-12-2007','dd-mm-yyyy'),3);
    INSERT INTO SALES VALUES(5,TO_DATE('05-01-2008','dd-mm-yyyy'),1);
    INSERT INTO SALES VALUES(6,TO_DATE('12-01-2008','dd-mm-yyyy'),3);
    INSERT INTO SALES VALUES(7,TO_DATE('12-02-2008','dd-mm-yyyy'),1);
    INSERT INTO SALES VALUES(8,TO_DATE('12-02-2008','dd-mm-yyyy'),2);
    INSERT INTO SALES VALUES(9,TO_DATE('12-02-2008','dd-mm-yyyy'),3); 
    
    
    --SALESLINE table data
    INSERT INTO SALESLINE VALUES(1,1,3,1000);
    INSERT INTO SALESLINE VALUES(1,3,1,5500);
    INSERT INTO SALESLINE VALUES(1,4,1,6000); 
    INSERT INTO SALESLINE VALUES(1,6,2,500);  
    INSERT INTO SALESLINE VALUES(1,7,2,200);   
    INSERT INTO SALESLINE VALUES(2,2,2,1900);    
    INSERT INTO SALESLINE VALUES(2,7,2,200);     
    INSERT INTO SALESLINE VALUES(3,4,1,5500);     
    INSERT INTO SALESLINE VALUES(4,2,1,2200);     
    INSERT INTO SALESLINE VALUES(5,6,1,300);      
    INSERT INTO SALESLINE VALUES(5,7,2,250);      
    INSERT INTO SALESLINE VALUES(6,6,1,300);       
    INSERT INTO SALESLINE VALUES(6,7,3,180);        
    INSERT INTO SALESLINE VALUES(7,1,2,1000);         
    INSERT INTO SALESLINE VALUES(7,2,1,1900);          
    INSERT INTO SALESLINE VALUES(7,3,2,5500);           
    INSERT INTO SALESLINE VALUES(8,4,1,5500);            
    INSERT INTO SALESLINE VALUES(8,6,2,300);             
    INSERT INTO SALESLINE VALUES(8,7,1,200);              
    INSERT INTO SALESLINE VALUES(9,1,3,1000);               
    INSERT INTO SALESLINE VALUES(9,3,2,5500);                
    INSERT INTO SALESLINE VALUES(9,5,2,1000);                 
    
    
    --STOCK table data
    INSERT INTO STOCK VALUES(1,200,15);
    INSERT INTO STOCK VALUES(2,25,10);
    INSERT INTO STOCK VALUES(3,40,10); 
    INSERT INTO STOCK VALUES(4,20,10); 
    INSERT INTO STOCK VALUES(5,10,10);  
    INSERT INTO STOCK VALUES(6,50,20);   
    INSERT INTO STOCK VALUES(7,150,20);    
    
    
    
    
    COMMIT;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    Concerning

    I could not figure out how you pulled your expected results, especially the last column. I guess that your problem I have several prod_id table productline / salesline. If a group of prod_id in these table should solve your problem. Something like that

    SQL> select p.prod_id         as product_prod_id
      2       , p.name            as product_name
      3       , p.description     as product_description
      4       , s.prod_qty        as stock_prod_qty
      5       , s.re_ord_level    as stock_re_ord_level
      6       , pl.pur_qty        as purchaseline_pur_qty
      7       , pl.unit_pur_price as purchaseline_unit_pur_price
      8       , sl.sal_qty        as salesline_sal_qty
      9       , sl.unit_sal_price as salesline_unit_sal_price
     10    from product p
     11    join stock s
     12      on p.prod_id = s.prod_id
     13    join (
     14            select prod_id
     15                 , sum(pur_qty) pur_qty
     16                 , sum(unit_pur_price) unit_pur_price
     17              from purchaseline
     18             group
     19                by prod_id
     20         ) pl
     21      on p.prod_id = pl.prod_id
     22    join (
     23            select prod_id
     24                 , sum(sal_qty) sal_qty
     25                 , sum(unit_sal_price) unit_sal_price
     26              from salesline
     27             group
     28                by prod_id
     29         ) sl
     30      on p.prod_id = sl.prod_id
     31   order
     32      by p.prod_id;
    
    PRODUCT_PROD_ID PRODUCT_NAME         PRODUCT_DESCRIPTION                      STOCK_PROD_QTY STOCK_RE_ORD_LEVEL PURCHASELINE_PUR_QTY PURCHASELINE_UNIT_PUR_PRICE SALESLINE_SAL_QTY SALESLINE_UNIT_SAL_PRICE
    --------------- -------------------- ---------------------------------------- -------------- ------------------ -------------------- --------------------------- ----------------- ------------------------
                  1 RAM                                                                      200                 15                   40                        1800                 8                     3000
                  2 DVD Drive                                                                 25                 10                   10                        1700                 4                     6000
                  3 HDD                  160 GB Satta                                         40                 10                   25                       10000                 5                    16500
                  4 Monitor              LCD 19\"                                             20                 10                    9                        5500                 3                    17000
                  5 Printer              HP Color                                             10                 10                   10                        3450                 2                     1000
                  6 Keyboard             Multimedia Keyborad (Customised)                     50                 20                   55                        1130                 6                     1400
                  7 Mouse                Customised Mouse                                    150                 20                  200                         450                10                     1030
    
    7 rows selected.
    
  • Thunderbird does not recognize groups of outlook express news. What can I do to fix?

    Years, I had no problem emailing messages to my Outlook Express news groups. Now, when I try to do, I get a message saying that the news group "is not a valid email address because it is not of the form user@host.» Thanks for your help.

    See the bug:

    Please register and add comments stating what OS you are using and what version of thunderbird. then Vote for the bug - this at the top:

    • Importance:-normal (vote)

    (Vote) is a link: click on it. Select the check box for the bug and click the button "change my voice."

    Workaround solution:

    Comment of Fabian Rodriguez 2014-09-04 06:19:15 PDT

    Confirmed workaround solutions:

    • All by composing an email open the address book and select the list you want to send, to highlight all the names in the list and drag them to the To: box. This example uses your existing data without changing it.
    • Replace white "" between the words in the descriptions of these lists with an underscore "_". This requires modification of your descriptions of mailing list (s).
  • Article not available - this article cannot be read

    With the exception of free U2 songs, my playlist everything is grey and when you try to play a song I get the message "not available article - this article cannot be read.  Same problem when I connect my phone to my laptop and access iTunes.  I see the reading list, but can't play the songs.  Not exactly how long it has been like this that I had not used for a while.  Any help would be appreciated.  I don't know that I'm missing something simple.  I have an iPhone 6 and I am up to date with all updates.

    Hey there,

    I had this problem two minutes ago, but I managed to fix it. During the synchronization of your iPhone to iTunes, your phone is unlocked? Mine was and the music was grayed out, I tried the lock phone and disconnect it from the computer and then plug it back again. The music is fine and everything is back to normal.

    I hope this works,

    Miomo

Maybe you are looking for

  • Blogger paste with binding

    When I copy a link using Firefox 13.0 for Ubuntu the cursor changes to a hand holding a link. I can not paste the link, or exit Firefox then have to restart my computer. This only started happening after I upgraded to Firefox 13.0.

  • Desktop HP Envy 700-305no: SSD Installation Guide

    Hello The pc comes with a hard drive hybrid with 16 GB of cache Express, and some say, that I am therefore not able to install the SSD. The wish for SSD comes from the coming Win 10 which I would install on SSD alongside the most used applications ei

  • Satellite P300 - 1-9-10 SD card reader code

    Hi all I have a new Toshiba P300 - 1 9, good for six months, and have just for the first time I tried an SD card into the slot of the multimedia card digital.The card does not appear in 'my computer '. In Device Manager it shows with the yellow sign

  • Number of cycles in the target FPGA VI

    Hello to everyone. I'm working on a project where I use sb RIO 9636. I subtract a number of past and present of the encoder pulses. Here, I have attached VI that I use as target VI. When I use simulated I/O lets say that the program works correctly.

  • Cannot delete system images (even via Control Panel)

    Hello. I tried to delete all the images in Windows backup system. I was able to delete the backups themselves, but does not remove the images. I did this: 1. went to the control panel 2. went to "Back up your computer" under system and security 3. cl