Displaying categories on basis of unique centerId

Hello,
SQL> desc emailCat
Name                                      Null?    Type
CAT_ID                                    NOT NULL NUMBER(14)
ADMIN_ID                                           NUMBER(14)
C_ID                                               NUMBER(14)
CATEGORY                                           VARCHAR2(110)
SQL>In above table c_id is foreign key that presents center Id and each c_id may have many categories(cat_id). I want to display unique c_id with it many cat_id. I think if we make one query of the following statement then it could be achieved. How can I make one query out of following two queries?
select unique(c_id) from emailCat;
select cat_id from emailCat where c_id=? /**on basis of unique c_id of first query**/Please help me
Thanks in anticipation

create table emailCat(
cat_id number(14) primary key,
admin_id number(14) constraint emailCat_fk1 references Admin(admin_id),
c_id number(14) constraint emailCat_fk2 references Centers(c_id),
category varchar2(110)
create sequence emailCat_seq
start with 1 increment by 1;
create or replace trigger emailCat_trig
before insert on emailCat
referencing new as new
for each row
begin
select emailCat_seq.nextval into :new.cat_id from dual;
end;
insert into emailCat(c_id,category) values(786169,'Registered Patients');
insert into emailCat(c_id,category) values(786169,'Newsletter');
insert into emailCat(c_id,category) values(786169,'Hello Testing');Need output like:
select unique(c_id) from emailCat;
select cat_id from emailCat where c_id=?
Thanks for replying and best regards

Similar Messages

  • How to display content dynamically base on the menu selection?

    I have only one XML file to populate my menus and display the
    content base on the menu selection.
    If I select anything by name on the menus, example Math all
    the the Math products will display on the dsFeatures region.
    I use istinctOnLoad: true, distinctFieldsOnLoad:['name']
    function to remove duplicate rows from the data set when it loads.
    So far so good.
    Once I try to select from the grades menu this does not
    display anything.
    I'll need to dynamically change the dsFeatures.setPath when I
    click on the menus some how.
    dsFeatures.setXPath("products/product[grade =
    '"+???+"']/features/feature");
    Below is my code.
    XML used to create the menus and the display the content.
    <products>
    <product>
    <name>Math</name>
    <category>Life Math</category>
    <grade type="grade">Grade 6 - 8</grade>
    <subject>Life Math Grade 6 - 8</subject>
    <image>images/math_icon.png</image>
    </product>
    <product>
    <name>Math</name>
    <category>Division</category>
    <grade type="grade">Grade 5</grade>
    <subject>Life Math Grade 5</subject>
    <image>images/math_icon.png</image>
    </product>
    <product>
    <name>Science</name>
    <category>Life Math</category>
    <grade type="grade">Grade 6 - 8</grade>
    <subject>Life Science Grade 6 - 8</subject>
    <image>images/science_icon.png</image>
    </product>
    <product>
    <name>Social Studies</name>
    <category>Studies</category>
    <grade type="grade">Grade 5</grade>
    <subject>Social Studies Life Grade 5</subject>
    <image>images/social_icon.png</image>
    </product>
    <product>
    <name>Language Arts</name>
    <category>Life Arts</category>
    <grade type="grade">Grade 3 - 4</grade>
    <subject>Life ArtsGrade 3 - 4</subject>
    <image>images/language_icon.png</image>
    </product>
    </products>
    // Get all the products data and use distinct() to filter the
    names.
    var dsProducts = new
    Spry.Data.XMLDataSet("included/d_products.xml",
    "/products/product", { useCache: false, distinctOnLoad: true,
    distinctFieldsOnLoad:['name']});
    // Get the menu by grade using distinct()
    var dsByGrade = new Spry.Data.XMLDataSet(null,
    "/products/product/grade", { useCache: false, distinctOnLoad: true,
    sortOnLoad: "grade", distinctFieldsOnLoad:['grade'] });
    // Create the dsFeatures data set, pass a null for the URL
    parameter so that it doesn't load
    var dsFeatures = new Spry.Data.XMLDataSet(null,
    "/products/product[name = '{dsProducts::name}']/features/feature",
    { useCache: false });
    // Define a function that to register as an observer on
    dsProducts.
    function updateCategoriesAndFeatures(notificationType,
    notifier, data)
    // Interested in "onPostLoad" notifications.
    // If it is any other notification, just bail.
    if (notificationType != "onCurrentRowChanged" &&
    notificationType != "onPostLoad")
    return;
    // Received an "onPostLoad" or "onCurrentRowChanged
    notification
    // from dsProducts! Ask it for its XML document. If it has
    one, tell
    // dsFeatures to extract its data from that document.
    var doc = dsProducts.getDocument();
    if (doc)
    if (notificationType == "onPostLoad")
    dsByGrade.setDataFromDoc(doc);
    dsFeatures.setDataFromDoc(doc);
    // Register the function as an observer on dsProducts.
    dsProducts.addObserver(updateCategoriesAndFeatures);
    Menus:
    Display by names:
    <ul spry:region="dsProducts" id="nameRegion">
    <li class="product" spry:repeat="dsProducts"
    spry:setrow="dsProducts" spry:select="selected" spry:hover="hover"
    >{name}</li>
    </ul>
    Display by grades:
    <ul spry:region="dsByGrade" id="gradeRegion">
    <li class="grade " spry:repeat="dsByGrade"
    spry:setrow="dsByGrade" spry:select="selected" spry:hover="hover"
    >{grade}</li>
    </ul>
    Content.
    Display the features content:
    <ul spry:region="dsFeatures">
    <li spry:repeat="dsFeatures">{subject} <br />
    {image}</li>
    </ul>
    Any idea on how to go about this or pointer to an example
    would be appreciated.
    ~Cheers

    Does anybody have idea?

  • ACD 30 Users: What is the height of the display w/o base? viewable height?

    Apple does not list the display height or measurements without the base -
    1. Can someone tell me what the size of the display is, including the the case/bezel, and
    2, What is the viewable height of the screen?
    I'm trying to determine how close in size my NEC 2090UXi is if I rotate it to use as a 'menus, palettes and mail' monitor in portrait mode next to an ACD 30.
    Thanks in advance!
    Sarge

    Thanks. That's interesting, and surprising - it makes that the 'densest' monitor I've ever seen with regard to how tightly the pixels are stacked.
    My 20" NEC LCD2090UXi 1600x1200 is, when rotated to portrait mode (i.e. 1200x1600)about 17.5" tall, vs. the ACD 30's 15" for the same 1600 pixels.
    I suppose a 19" monitor in 1600x1200 would be a better choice for a 'portrait mode' 'partner' to the ACD30...
    Though I don't yet know if I can rotate the second display anyway, when running it from my yet-to arrive re-flashed GeForce 7800GTX video card.
    Thanks for the answer, though!

  • How to display records from base table as well as some other table?

    Hello expert,
    I have a requirement to develope a form described below:
    One control block and database block.
    DB block  is based on table T1 (USER, Table_name, Column_name, ACCESS);
    In control block, there are three fields,
    User, Table user will enter , and DB block will query based on control block fields(user, table_name).
    In table it is not necessary that all the columns of any table will be given.
    suppose there is a Table X consist of 10 column.
    Initially user give access for all the 10 columns through this form.
    if we query for user , table, all the record will come from table T1.
    now consider the case, when access given to table X number of columns were 10. after that 2 new columns added later.
    now there is no info of added column in table T1. i want if user query DB block, these newly added column must display in DB Block.
    Please help me out.
    Thanks
    Dhirender

    >i want if user query DB block, these newly added column must display in DB Block.
    You need to modify your form and add the two columns as base table items. Forms does not add two base table items by itself.

  • Not able to display the Installation Base of once it unassigned from upper level Installation IBase.

    Hi All
    I am working on IBase scenario for my client, I am new to the IBase scenario. Here we are creating installation base for two to five levels of product.
    Once we create IBase for lower level then this IBase is inserted in upper level IBase. Like this we assign all levels based on product.In some cases we need to unassign any of IBase from its upper level IBase. When it is unassigned we are not able to display the IBase which unassigned. When it is unassigned from upper level how come system not able to display this IBase. If we speak functionally the part (IBase) which is unassigned should be valid to assign in any other upper level IBase in feature.
    The error I am getting for above is
    Serial number XXXXXXX for material XXXXXXX does not exist in any IBase
    Message no. IQ122
    Diagnosis
    Serial number BMF3000106 for material S24-D5022-C100-6 does not exist in any installed base on 31.03.2015 at 10:22:09.
    System Response
    The system cancels processing.
    Hi experts please suggest.
    Regards
    Kesava

    Hello Kesava
    Can you please explain in detail what exactly you are trying to do while assigning and unassigning Ibase.
    Regards
    Naresh

  • Display all columns but only unique values in one column

    My table looks like this;
    ApprovalKey (PK)
    ApprovalCCN (Links to main table)
    ApprovalName
    ApprovalDate
    ApprovalMsg
    ApprovalResult
    Typical data would look like;
    Key CCN ApprovalName ApprovalDate ApprovalMsg ApprovalResult
    1 1 John Smith 12/12/2014 16:20:22 Testing the message False
    2 1 Andy Brown 12/12/2014 16:20:27 testing the decline False
    3 1 John Smith 12/12/2014 16:20:46 More testing True
    4 1 Andy Brown 12/12/2014 16:25:13 testing True
    5 2 Andy Brown 12/12/2014 16:25:26 testing the accept True
    6 2 John Smith 12/12/2014 16:34:04 testing, 1 2 True
    When I view data from linked table (matched via ApprovalCCN) It should display data from this table but only the latest unique entry from ApprovalName.
    eg, table from above has 4 entries for ApprovalCCN=1 but should only show the following;
    Key CCN ApprovalName ApprovalDate ApprovalMsg ApprovalResult
    3 1 John Smith 12/12/2014 16:20:46 More testing True
    4 1 Andy Brown 12/12/2014 16:25:13 testing True
    Distinct ApprovalName doesn't return all values and I can't seem to get my head around Group By to view all columns
    Any help would be appreciated

    Here is my test data;
    7 30 John Smith 12/12/2014 16:20:22 Testing the message False
    8 30 Andy Brown 12/12/2014 16:20:27 testing the decline False
    9 30 John Smith 12/12/2014 16:20:46 More testing True
    10 30 Andy Brown 12/12/2014 16:25:13 testing True
    20 30 David Jones 12/12/2014 16:25:26 testing False
    21 30 David Jones 12/12/2014 16:34:04 Testing the message True
    25 30 Me 12/12/2014 16:35:05 testing the decline False
    26 28 You 12/12/2014 16:36:05 testing the decline False
    27 28 Me 12/12/2014 16:37:05 testing True
    28 28 John Smith 12/12/2014 16:38:05 testing the decline False
    29 28 David Jones 12/12/2014 16:39:05 testing the decline False
    30 30 David Jones 14/12/2014 17:39:44 True
    31 29 David Sawyer 14/12/2014 18:51:06 declining the offer False
    32 29 David Sawyer 14/12/2014 18:51:37 My message False
    33 29 David Sawyer 14/12/2014 18:52:01 another message False
    34 29 David Sawyer 14/12/2014 18:52:16 True
    35 29 David Sawyer 14/12/2014 18:52:25 True
    36 29 David Sawyer 14/12/2014 18:52:34 True
    If ApprovalCCN=30 I get the following;
    10 30 Andy Brown 2014-12-12 16:25:13.000 testing 1 1
    30 30 David Jones 2014-12-14 17:39:44.000 1 2
    9 30 John Smith 2014-12-12 16:20:46.000 More testing 1 1
    25 30 Me 2014-12-12 16:35:05.000 testing the decline 0 1
    All I need is 3 Approved, 1 Declined
    Apologies if I wasn't clear

  • Displaying categories using an analitic webpage

    using bo 6.1 and XIR2, we were able to create a dashboard showing a list of reports belonging to a categorie. We did this by creating an analitic webpage and pasting a URL displaying the contents of this categorie. In XI R3 we could not find this URL. We tried using the opendocument method, but no result. The only thing we got was a message saying an error occured.
    Could somebody help me finding the url for displaying the contents of an categorie?

    What you are trying to do is a bit complicated and requires that you know JavaScript. When the user selects something in the browser, you want to pop up another list without going back to the server. This is where the JavaScript comes in. You'll have to put all the brands into various JavaScript arrays (one for each category). If you have lots of brands, this might not be such a good idea since you'll be transmitting lots of data most of which won't be used. If you go back to the server each time the user selects a category, the code will be much simpler and won't require that you know much JavaScript.

  • Display rows which has only unique column values

    One of my table has the following data in it.
    ORDER_NO    IND_CODE
    1002              DNA
    1004              GEN
    1005    
    1007              DNA
    1008              DNA
    1009              GEN
    1010    
    1000              NULL
    1001              NULL
    1003              NULL
    1006              NULL
    1000              ZZZ
    1005              ZZZ
    I just want to display the rows with unique ORDER_NO.
    Sarvan

    You have 1000 as duplicate values in the column. But both have different indcode.
    Select distinct order_no from [table name]
    If you need combination of order_no and ind_code as unique then .
    Select distinct order_no, ind_code from [table name]

  • Display amount from Base Planning Object or Cost Estimate W/O Qt St in COPA

    Dear all,
    Can we display the amount we calculated in Base Planning Object or in Cost Estimate w/o Quantity Structure?
    if Yes, How?
    Many thanks,
    EW

    Try with
    <b>OPEN DATASET p_pfile FOR APPENDING IN BINARY MODE.</b>
    Regds
    Manohar

  • Display in gui-base problem ??

    I am going to put those elemets that i construct on the top of my gui base-panel .how come it can`t display what i want ?
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Login extends JFrame
    private Container contents;
    private JLabel  NameOfTheTeaml, NameOfTheTeam2, message;
    private JTextField Team1, Team2;
    private JPasswordField password;
    private JTextArea legal;
    // Constructor
    public Login( )
      super( "Login Screen" );
      contents = getContentPane( );
      //contents.setLayout( new GridLayout(1,2));
      JPanel top = new JPanel(new GridLayout(1,2));
      top.setBackground(Color.WHITE);
      NameOfTheTeaml = new JLabel( "Team1 :" ); // label for Team1
      Team1 = new JTextField(6);      // instantiate Team1 text field
      top.add( NameOfTheTeaml );
      top.add( Team1 );
      NameOfTheTeam2 = new JLabel( "Team2 : " ); //label for Team2
      Team2 = new JTextField(6); // instantiate Team1 text field
      top.add( NameOfTheTeam2 );
      top.add( Team2 );
      message = new JLabel( "World Cup" );  // label to hold messages
      top.add( message );
      TextFieldHandler tfh = new TextFieldHandler( );
      // add event handler as listener for ID and password fields
      Team1.addActionListener( tfh );
      Team2.addActionListener( tfh );
      setSize( 550, 300 );
      setVisible( true );
    // private inner class event handler
    private class TextFieldHandler implements ActionListener
      public void actionPerformed( ActionEvent e )
       if ( Team1.getText( ).equals( "" )  || ( ( Team2.getText( ) ) ).equals( "" ) )     
          message.setForeground( Color.RED );
          message.setText( "Sorry!! Please enter two teams" );
       else
             message.setForeground( Color.BLACK );
          message.setText( Team1.getText() + "VS" + Team2.getText());
    public static void main( String [] args )
      Login login = new Login( );
      login.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }

    I am going to put those elemets that i construct on
    the top of my gui base-panel .how come it can`t
    display what i want ? How am I supposed to know what you want? You need to tell us what it does and what you want it to do instead.

  • Safari 7.1 can't display Apple Knowledge Base pages

    Here's a strange one:
    I routinely visit Apple's Knowledge Base web pages when seeking help for using various OSX tools.
    As of a couple of weeks ago, whenever I attempt to visit a kbase page using Safari 7.1, all I get is a blank screen. If I load the same URL into Chrome, the kbase page displays just fine.
    For example, I can see this page in Google Chrome but not Safari:
    iMovie (2013): Effects and adjustments overview
    Am I alone? Is this a weird Safari bug that others have encountered?

    Delete Apple related cookies.
    Safari > Preferences > Privacy  > Cookies and website data:
    Click the “Details” button.
    Select and “Remove”  all Apple related cookies.

  • Weight of Apple HD 30" display w/o base

    Need to retrofit an existing system with an Apple HD 30" display and mount on arm. What is the weight of monitor w/o base attached?
    Thank you
    E

    Weight: 27.5 pounds (12.47 kg) with base. [reference]
    I wouldn't worry about the weight of the base.  It's is insignificant comparted to the extra margin of weight capacity you want for any arm anyhow.
    You will need the following for any VESA compatible mounting arm:
    Cinema Display VESA Mount Adapter Kit

  • Changing the report displayed on the basis of value selected frm the prompt

    Hi,
    I have requirement in which there is dashboard prompt which has three columns namely year, month and report name.
    The user will select the report name from the prompt, once done the report that has been selected should show up
    on the dashboard page and he should be able to select data on the basis of month and year from it.
    Also, if the user wants to go to the other report he should be able to select it from the prompt and view it.
    Pls shed some light on how to progress about it. As of now think if something like this is possible then it would definitley
    need two prompts one for report name and the other for month and year.
    Thx :)

    Hi Kishore,
    When i click on the link given by you it takes me to a page where a link is given with text as under
    Oracle BI 10.1.3.3/2 - Selecting Reports from Dashboard Prompts and Guided Navigation Sections
    And when i click on this nothing opens up.
    Thx
    Edited by: Phantasm on Jun 22, 2010 3:05 AM

  • How to display modified condition base value in Pricing Procedure?

    Hi everyone:
    I used a formula to change the condition base value (via the VOFM transaction) of various price conditions that are assigned to the same material. In this way, I can distribute the total quantity of the item line in smaller quantities for each price condition.
    Now the problem is that in the conditions tab of the sales order, I can not see the Condition Base Value of each Price Condition, and that's a little confusing.
    Did Anyone know's a way to show the modified Condition Base Value in the Pricing Procedure of the Condition Tab?
    Thanks a lot,
    Ginno Giuffra

    Thanks JJ:
    Yes,  I can found the modified base value in the condition details, but I still need to show it in the Pricing Procedure scheme.
    It is curious that the table options does not allow you to add that field to the escheme.
    Does anyone knows a user exit wich can modifye the table?
    Thanks again,
    Ginno Giuffra

  • Problem to display categories and forums

    Hi folk,
    We are trying to set up collaboration forums. We have created some categories (with their own forums) and forums under Root Category.
    However, when we access to the forum iView (user view), categories and forums created do not appear.
    Where is the problem?
    Thanks in advance,
    Samantha.

    We have the same setting in two different EP7. In one, categories and forums are visible, but in the other one, not.
    Maybe permissions?
    First portal (that works correctly ) uses "j2ee_admin" in the permisssions summary section and the other one uses "Administrator" in the same section. However, the permissions summary is equal in both administrator users.
    Thanks again.
    Samantha.

Maybe you are looking for