Need a bit of help with css and fullscreen

I am currently doing a javaFX application for my university project, I have it everything nearly finished, but need to finish the css component to make the application "prettier" (I am not very good on graphic design to be honest). So if i could get a bit of help on this little issue I'd be very grateful.
is there any way to make fullscreen (and if possible resizing window) to instead rearranging everything to actually do a fullscreen (like the games) and everything "grows accordingly (even though in games what it usually does is to change the screen resolution, is that possible to reproduce with javaFX?) also how to remove the message and the effect on click the "esc" key to exit the fullscreen mode?
i know that removing the focus effect on an element is with the following (if a button)
.button:focused{
     -fx-background-insets: 0;
}but,is there any way to remove the effect on anything focused (TextField, Combo Box, ...)? (tried with a .textfield:focused but it did not work)
also i wanted to produce the focused effect by this way but it didn't work, how should i do it? (in fact even if i try to put this line on the button:focused, the focused effect gets removed from there, because of the insets line)
#highlight{
     -fx-background-insets: 2;
     -fx-background-color: yellow;
public class controller extends StackPane implements Initializable{
     public void highlight(){
          this.getStyleClass().add("highlight");
and last thing (for the moment) the .button seems to work for all the buttons, but trying another thing like .gridpane or .textfield or .scrollpane does not seem to work, is there any way to make it work or i should add "id" to all the elements and use the # instead?

i wrote all them in the same thread becsause there were a total of 4 (and could had been more) separated by ----
should i leave it how it is or open now 4 threads for each question?

Similar Messages

  • I need help with CSS and floating

    Okay, I know I need to get up on CSS and get rid of tables in
    my sites.
    However, I'm running up against a problem, and after banging
    my head
    against it for a while, I realize I need help. I've stripped
    this down
    so as to only show the area where I'm having difficulty.
    What I want is a page that has everything down the center,
    taking up no
    more than 750 pixels and no more than 550 pixels of width. No
    problem there.
    After the header and the top content, I'd like to have two
    "columns",
    each in it's own separately-colored box. I would like the
    right-side
    column/box to be a static size, while the left-side
    column/box sizes
    dynamically.
    Where I'm having problems is that when one column is boxed,
    it's fine,
    but whenever I wrap each column in its own box, the
    fixed-size box
    either jumps below or above the other box (depending on which
    one has
    been floated and which order the div's appear in the code).
    Here are the links:
    CSS:
    http://www.afice.org/stylesheet/floatmestyles.css
    ex 1:
    http://www.afice.org/floatme1.html
    ex 2:
    http://www.afice.org/floatme2.html
    Before sending, I took a look again, just to see if I was
    missing
    anything. I did notice that it doesn't seem to be that the
    box is
    jumping down so much as it is that it's getting written over.
    Anyway, sorry for the long-winded explanation. I hope I've
    managed to
    explain what I'm trying to do well enough that someone can
    tell me where
    I'm going wrong.
    Thanks,
    --Kevin

    Do you want something like this:
    http://www.pmob.co.uk/temp/spointfooter.htm
    You will need to look at the code to see how it was done.
    Otherwise, there are different examples here on Pauls' site:
    http://www.pmob.co.uk/temp/3colfixedtest_4.htm
    Nadia
    Adobe� Community Expert : Dreamweaver
    http://www.csstemplates.com.au
    - CSS Templates | Free Templates
    http://www.perrelink.com.au
    - Web Dev
    http://www.DreamweaverResources.com
    - Dropdown Menu Templates|Tutorials
    http://www.adobe.com/devnet/dreamweaver/css.html
    "Kevin D-R" <[email protected]> wrote in
    message
    news:[email protected]...
    > Okay, I know I need to get up on CSS and get rid of
    tables in my sites.
    > However, I'm running up against a problem, and after
    banging my head
    > against it for a while, I realize I need help. I've
    stripped this down so
    > as to only show the area where I'm having difficulty.
    >
    > What I want is a page that has everything down the
    center, taking up no
    > more than 750 pixels and no more than 550 pixels of
    width. No problem
    > there.
    >
    > After the header and the top content, I'd like to have
    two "columns", each
    > in it's own separately-colored box. I would like the
    right-side column/box
    > to be a static size, while the left-side column/box
    sizes dynamically.
    >
    > Where I'm having problems is that when one column is
    boxed, it's fine, but
    > whenever I wrap each column in its own box, the
    fixed-size box either
    > jumps below or above the other box (depending on which
    one has been
    > floated and which order the div's appear in the code).
    >
    > Here are the links:
    >
    > CSS:
    http://www.afice.org/stylesheet/floatmestyles.css
    >
    > ex 1:
    http://www.afice.org/floatme1.html
    >
    > ex 2:
    http://www.afice.org/floatme2.html
    >
    > Before sending, I took a look again, just to see if I
    was missing
    > anything. I did notice that it doesn't seem to be that
    the box is jumping
    > down so much as it is that it's getting written over.
    >
    > Anyway, sorry for the long-winded explanation. I hope
    I've managed to
    > explain what I'm trying to do well enough that someone
    can tell me where
    > I'm going wrong.
    >
    > Thanks,
    >
    > --Kevin

  • Need a bit of help with a code

    Hello adobe community!
    i have been fiddling around with FLASH MX and have been making a game VERY slowly.
    i've picked up alot since starting and have restarted making said game MANY MANY times =D...
    But i have now got a copy that is neat and clean and works really well BUT i've come into a bit of a problem.
    i have  _global.goldenticket = 0;   on my first frame along with other variables and i have made a single location where one can aquire a "goldenticket".
    now things are starting to confuse me... ive added a button inside a movie clip which if clicked "should" check if i have a golden ticket and then allow me to jump to the frame specified...
    on(release){
    if(goldenticket=="1"){
    money -= 50;
    energy -=50;
    _root.gotoAndPlay("enter");
    }else{
    this.enabled=false;
    however the button doesnt seem to see my ticket (even tho ive added a dynamic textbox to keep track of how many i have, which is 1)
    ive tried many different ways to go around this but i cannot seem to get it to work...
    please someone help me... in relativly simple answers please =\ im only a few days into flash learning and codeing. but im enjoying what im doing so im learning quickly.
    will have my face to the screen in waiting =D
    Thank you to everyone who took a look at my thread!

    THANK YOU!!!
    REALLY quick response WITH lang i could easily understand...
    mate thank you haha been wrapping my brain for hours on end with other things didnt even occure to me to slap _global infront.

  • Need a bit of help with Jumping in a game

    I making an action game (at least for the sake of this question) and when the user presses the spacebar the character jumps. The problem is, if the character is moving right or left, and jumps while he is moving, he will stop moving in mid-air (if the spacebar is released) and just drop straight down. Example:
    press right arrow key
    player moves right
    press space while pressing arrow key
    player jumps
    let go of spacebar
    player drops straight down (does not continue to move right) //Problem
    It's pretty simple code, actually:
    /* Move player left or right */
    if (pressedRight)
            player.x_pos += player.x_speed;
    else if (pressedLeft)
            player.x_pos -= player.x_speed;
    /* If spacebar is pressed */
    if (pressedSpace && !player.moveUp)
            player.moveUp = true;
            player.y_speed = player.INITIALSPEED;
    /* if you are in "jump mode" */                         
    if (player.moveUp)
            player.y_pos += player.y_speed;
            player.y_speed += .25;
            if (player.y_pos >= TheGround)
                      player.moveUp = false;
                      player.y_speed = 0;
    public boolean keyDown(Event e, int key)
            if(key==Event.LEFT)
                      pressedLeft = true;
            if(key==Event.RIGHT)
                      pressedRight=true;
            if(key==Event.UP)
                      pressedUp=true;
            if(key==Event.DOWN)
                      pressedDown=true;
            if (key ==  ' ')
                      pressedSpace = true;
            repaint();
            return true;
    public boolean keyUp(Event e, int key)
            pressedLeft=false;
            pressedRight = false;
            pressedSpace = false;
            repaint();
            return true;
    }

    Run this code and you'll see what I'm talking about:
    import java.awt.*;
    import java.applet.*;
    public class Testing extends Applet implements Runnable
        Thread runner;
        private Image Buffer;
        private Graphics gBuffer;
        final int theGround = 205;
         boolean pressedLeft, pressedRight, pressedSpace;
         final int width = 10, height = 10;
         final int INITIALSPEED = -5;
         double x_pos = 100;
         double y_pos = 190;
         boolean moveUp = false;
         double y_speed = 3;
         double x_speed = 3;
        //Init is called first, do any initialisation here
        public void init()
            //create graphics buffer, the size of the applet
            Buffer=createImage(size().width,size().height);
            gBuffer=Buffer.getGraphics();
        public void start()
            if (runner == null)
                runner = new Thread (this);
                runner.start();
        public void stop()
            if (runner != null)
                runner.stop();
                runner = null;
        public void run()
            while(true)
                 /* MAIN CODE*/
                //Thread sleeps for 15 milliseconds here
                try {runner.sleep(15);}
                catch (Exception e) { }
                //paint background blue
                gBuffer.setColor(Color.blue);
                gBuffer.fillRect(0,0,size().width,size().height);
                   if (pressedRight)
                        x_pos += 1;
                   else if (pressedLeft)
                        x_pos -= 1;
                   if (pressedSpace && !moveUp)
                        moveUp = true;
                        y_speed = INITIALSPEED;
                   if (moveUp)
                        y_pos += y_speed;
                        y_speed += .15;
                        if (y_pos + height + y_speed >= theGround)
                             moveUp = false;
                             y_speed = 0;
                Draw();
                repaint();
        //is needed to avoid erasing the background by Java
        public void update(Graphics g)
            paint(g);
        public void paint(Graphics g)
            g.drawImage (Buffer,0,0, this);
        public boolean keyDown(Event e, int key)
            if(key==Event.LEFT)
                pressedLeft = true;
            if(key==Event.RIGHT)
            pressedRight=true;
            if (key ==  ' ')
                 pressedSpace = true;
            repaint();
            return true;
        public boolean keyUp(Event e, int key)
            pressedLeft=false;
            pressedRight = false;
            pressedSpace = false;
            repaint();
            return true;
        public void Draw()
              gBuffer.setColor(Color.green);
              gBuffer.fillOval((int)x_pos,(int)y_pos,width,height);
              gBuffer.setColor(Color.yellow);
              gBuffer.drawLine(0, 200, 500, 200);
              gBuffer.drawString(("Move right/left, press space, and it will stop and fall straight down! Why?"), 10, 20);
              gBuffer.drawString(("Hold the spacebar down and it will work like it should."), 10, 30);
              gBuffer.drawString(("ALSO, move left or right then *QUICKLY* release and move in the opposite direction."), 10, 50);
                   gBuffer.drawString(("-- You should see it pause for a second. Why is that?"), 10, 60);
    }Sorry for some reason the tabs get messed up when I cut and pate it from JCreator. :P
    PLEASE HELP!
    Thanks in advance.

  • Need a bit of help with some theory...

    I'm just looking over some past paers for my exam and I'm having trouble understanding exactly what this question is asking for:
    What is an Enterprise computer system? Give an example of an Enterprise system. Critically discuss two alternative development environments that could be used to develop such a system. Suggest which development environment you would choose to develop the example enterprise system you have suggested and why.
    I'm just sure exactly what it means by development enviroments, does it mean a program like JDeveloper? A couple of examples would be really handy
    Thanks

    Think of an Enterprise computer system as nothing more than a resouce pool. A pool of database connections, persistant database objects, mail sessions, messaging sessions. Basically any resouce a developer would need to develop any type of application.
    As for environments... the two I think of are Microsoft .NET and Sun's Java System Application Server Platform. Thay are basically the same in concept, microsoft just repackaged everything good about Java and called it .NET. .NET is (of course) dependant on the Microsoft OS platform, Sun/Java is not.

  • Help with CSS and Hyperlinks

    Hey guys,
    I'm a beginner in using Dreamweaver and had a go building a
    basic website. I have some knowledge using HTML.
    Basically i set up a basic CSS that puts a border on any page
    i attach it to. But i've been using hyperlinks to connect the
    pages. In design mode it all looks fine, but when i preview in
    browser, the hyperlinks work but the CSS stops working and the
    border disappears.
    I do not know why it's doing this, does anyone have any
    suggestions on fixing the problem?
    Any suggestions are very grateful,
    many thanks,
    Katie x

    Let's see the pages, please.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "hayz222" <[email protected]> wrote in
    message
    news:f8nmq7$l5a$[email protected]..
    > Hey guys,
    >
    > I'm a beginner in using Dreamweaver and had a go
    building a basic website.
    > I
    > have some knowledge using HTML.
    >
    > Basically i set up a basic CSS that puts a border on any
    page i attach it
    > to.
    > But i've been using hyperlinks to connect the pages. In
    design mode it all
    > looks fine, but when i preview in browser, the
    hyperlinks work but the CSS
    > stops working and the border disappears.
    >
    > I do not know why it's doing this, does anyone have any
    suggestions on
    > fixing
    > the problem?
    >
    > Any suggestions are very grateful,
    >
    > many thanks,
    >
    > Katie x
    >

  • I need a bit of help with my 7600GT

    Alright.
    My motherboard doesn't have a VGA slot, and neither does this Video Card.  I understand that it is remedied with the adapters that are provided, but one must install the drivers for the DVI slots before one can do anything.  I can't get any output on my monitor with the adapters because I can't see what's going on to install the drivers.  I managed to install Windows by taking out my hard drive and putting it into another computer (SATA drive, btw) and I would have done the same with my video card if it weren't for the fact that no other computers in my house have PCI-E slots. 
    Is there any way to get the drivers onto this hard drive without having to search around town for a computer with both a SATA and a PCI-E slot?
    Thanks!

    iamquitethen00b,
    Moan Guide
    Richard

  • I need a "bit" of help with an 8 Puzzle

    My current situation is that I need to create a working 8 puzzle with Java using a GUI. What I've currently done is at http://nale.f2g.net/EightPuzzle.java . My main problem is that when running it I get a NullPointerException at the line containing tile[blankPos].setText(tile[ndx].getText()); in the swap method.

    I get a NPE when ever I use the scramble() method.
    The source is the line move(rand.nextInt(4)); .Your Random rand is not instantiated nowhere. Thus it is naturally null.
    Make rand in the constructor.
    Here's a simpler one. You could use random swap() calls for moving/shuffling/scrambling.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.Random;
    public class ObjectOrientedEightPuzzle extends JFrame implements MouseListener{
      private Piece[] tile;
      private Border etched = BorderFactory.createEtchedBorder();
      private Color tileColor = Color.GRAY;
      private Color blankColor = Color.GREEN;
      private String[] label = {"1", "2", "3", "4", "", "5", "6", "7", "8"};
      private JPanel pane;
      public ObjectOrientedEightPuzzle(){
        setTitle("ObjectOrientedEightPuzzle");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        pane = (JPanel)getContentPane();
        pane.setLayout(new GridLayout(3,3));
        setResizable(false);
        setSize(400, 400);
        tile = new Piece[label.length];
        for(int ndx = 0; ndx < label.length; ndx++){
          tile[ndx] = new Piece(label[ndx], new Position(ndx));
          tile[ndx].addMouseListener(this);
          pane.add(tile[ndx]);
      public void mouseClicked(MouseEvent e){
        Piece p = (Piece)e.getSource();
        Piece blank = blankPos();
        swap(p, blank);
      public void mousePressed(MouseEvent e){
      public void mouseReleased(MouseEvent e){
      public void mouseEntered(MouseEvent e){
      public void mouseExited(MouseEvent e){
      private void swap(Piece clickp, Piece blankp){
        int i = -1;
        int[] pa;
        int b = blankp.getPosition().getPos();
        pa = clickp.getPosition().getNeighbor();
        for (int p = 0; p < pa.length; ++p){
          if (pa[p] == b){
            i = p;
            break;
        if (i != -1){
          blankp.setText(clickp.getText());
          clickp.setText("");
      private Piece blankPos(){
        int ndx;
        for(ndx = 0; ndx < label.length; ndx++){
          if(tile[ndx].getText().equals("")){
            break;
        return tile[ndx];
      public static void main(String[] args){
        ObjectOrientedEightPuzzle puzzle = new ObjectOrientedEightPuzzle();
        puzzle.setVisible(true);
      // represent the position in the array/grid
      class Position{ // 0 ... 8
        int pos;
        int[] neighbor;
        public Position(int p){
          setPos(p);
        public int getPos(){
          return pos;
        public void setPos(int p){
          pos = p;
          setNeighbor(pos);
        public int[] getNeighbor(){
          return neighbor;
        private void setNeighbor(int p){
          switch (p){
            case 0:
              neighbor = new int[2];
              neighbor[0] = 1;
              neighbor[1] = 3;
              break;
            case 1:
              neighbor = new int[3];
              neighbor[0] = 0;
              neighbor[1] = 2;
              neighbor[2] = 4;
              break;
            case 2:
              neighbor = new int[2];
              neighbor[0] = 1;
              neighbor[1] = 5;
              break;
            case 3:
              neighbor = new int[3];
              neighbor[0] = 0;
              neighbor[1] = 4;
              neighbor[2] = 6;
              break;
            case 4:
              neighbor = new int[4];
              neighbor[0] = 1;
              neighbor[1] = 3;
              neighbor[2] = 5;
              neighbor[3] = 7;
              break;
            case 5:
              neighbor = new int[3];
              neighbor[0] = 2;
              neighbor[1] = 4;
              neighbor[2] = 8;
              break;
            case 6:
              neighbor = new int[2];
              neighbor[0] = 3;
              neighbor[1] = 7;
              break;
            case 7:
              neighbor = new int[3];
              neighbor[0] = 4;
              neighbor[1] = 6;
              neighbor[2] = 8;
              break;
            case 8:
              neighbor = new int[2];
              neighbor[0] = 5;
              neighbor[1] = 7;
              break;
            default:
              throw new IllegalArgumentException(String.valueOf(p));
      // represent the piece of the game == a JLabel disguised
      class Piece extends JLabel{
        private int value;
        private Position pos;
        private String ptext;
        public Piece(String s, Position p){
          super(s);
          setBorder(etched);
          setVerticalAlignment(CENTER);
          setHorizontalAlignment(CENTER);
          setFont(new Font("Courier", Font.BOLD, 30));
          setOpaque(true);
          ptext = s;
          pos = p;
          if (s.equals("")){
            setBackground(blankColor);
          else{
            setBackground(tileColor);
          try{
            value = Integer.parseInt(s);
          catch (NumberFormatException e){
            value = -1;
        public int getValue(){
          return value;
        public Position getPosition(){
          return pos;
        public String getText(){
          return ptext;
        public void setText(String t){
          ptext = t;
          if (t.equals("")){
            setBackground(blankColor);
          else{
            setBackground(tileColor);
          super.setText(t);
        public void setValue(int val){
          value = val;
          ptext = String.valueOf(val);
          if (val < 0){
            ptext = "";
          setText(ptext);
          if (value > 0){
            setBackground(tileColor);
          else{
            setBackground(blankColor);
    }

  • I need a bit of help with my iPhone 4...

    I just backed up my phone and I'm trying to update it to iOS 7.0.4. but when I updated my ipod, everything got deleted off of it. I don't want that to happen to my phone even though I know it probably will. If I restore my iPhone and then restore backup AFTER I update my phone, will I get everything back?
    Also, will everything actually be deleted or could I find them somewhere on my laptop?

    iamquitethen00b,
    Moan Guide
    Richard

  • Help with Zoom and fullscreen

    Hi, i'm a novice flash user and i have a few questions.
    Is it possible to lock the size of the movie using actionscript unless the user presses a button in which case it resizes the movie to fullscreen?
    Is it possible to call the flash player's zoom function (i don't know how to write a zoom function) in order to zoom in and out and asign them to 2 different buttons?
    Thanks

    i wrote all them in the same thread becsause there were a total of 4 (and could had been more) separated by ----
    should i leave it how it is or open now 4 threads for each question?

  • Need a little bit of help with substring...

    Im very new at java programming, and need a bit of help with a problem:
    Here is what I have:
    System.out.print("Enter a string : ");
    Scanner scan = new Scanner (System.in);
    stringy = scan.nextLine();
    Now I want to split the string "stringy" like this: h:hi:hip:hipp:hippo
    I know this uses substring, but I can't figure out how to do it.
    Any help would be great, thanks!

    I know about the length method, what I dont knowis
    how to use the length and substring methodstogether
    to solve the problem i mentioned initially. There are three ingredients to perform this task:
    - String.length()
    - String.substring(int start, int end)
    - for-statement:
    http://java.sun.com/docs/books/tutorial/java/nutsandbo
    lts/for.html
    Pseudo code:IN <- input String from user
    LOOP FROM 0 -> IN.length()
    print IN.substring(?, ?)
    print ":"
    END LOOP
    Remember, Im very new. ;)Remember that by just handing you the solution, you
    will learn far less than finding things out by
    yourself.
    ; )Thanks a lot, i should be able to figure it out froom the pseudo code. :)

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • Need Tips to Customise Invoice with Logo and Adjust Rows and Values

    Need Tips to Customise Invoice with Logo and Adjust Rows and Values

    Hi rabisaha,
    Your logo is an image. Details on adding and working with images in Numbers can be found in Chapter 9 of the Numbers '09 User Guide.
    Rows are part of a Table. I'm not certain what you are referring to when you say "adjust rows," but the details regarding adding, removing and changing rows are in the "Working with Rows and Columns in Tables" section of Chapter 3, Using Tables in the Numbers '09 User Guide.
    Adjusting values is done by entering new values, or by revising the formulas that create values. This is also conered in the User Guide in Chapter 4, Working with Table Cells.
    The Numbers '09 User Guide is free, and may be downloaded via the Help menu in Numbers. If you intend to create Numbers tables (or to modify formulas), you may also want the iWork Formulas and Functions User Guide, available from th same location.
    For anyone new to Numbers (and for old hands as well), I recommend reading at least the first four chapters of the Numbers guide. The rest can be kept to use as a reference as needed.
    Regards,
    Barry

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

Maybe you are looking for

  • Need a lot of custom JComponents, but Java just too 'slow', other Solution?

    Hi folks, first of all i'll try to explain my problem (although my english is quite bad) We're programming a tool for visualising graph algorithms (df search, strong connected components, transitive reduction etc.) For that, we got a drawing area (de

  • Nested Tables, Forms and Portal

    I am trying to implement a form in Portal that accesses a nested table. I can access normal tables but not my nested table. The nested table within the master table are object tables. When trying to access from the designer page I get an error indica

  • BW 3.5 SP13 with Business Content  3.53 SP4

    Hi experts! I have a BW system with the following configuration: BW 3.5 SP13 with Business Content  3.53 SP4. To install the xApp Analytics 1.1, I need at least the following configuration: BW 3.5 SP14 Business Content 3.5.3 SP6 Which features I will

  • Text item consumption values

    Can we know the total consumption of a text item in a bom over a period of time. Or can we know the consumption values of a phantom assembly Or is there a bom item which is not to be stocked , but thier quantity in bom multiplied with the order quant

  • I have a mac osx 10.5.8 I would like to know how to clean it up it is running slow.

    I have a mac osx 10.5.8 I would like to know a good program to use to clean it up, one that does not cost an arm and a leg, free would be better.