Bug in code

plz chk the following code..... n kindly let me know why is the code not working the way it should....
class Example
public static void main(String ar[])
double i;
for(i=.1; i!=10; i+=.1)
System.out.println(i);
kindly chk why the value of i is changing unsymetrically

plz chk the following code..... n kindly let me know
why is the code not working the way it should....
class Example
public static void main(String ar[])
double i;
for(i=.1; i!=10; i+=.1)
System.out.println(i);
kindly chk why the value of i is changing
unsymetrically\have you debugged the code?
what values does "i" take?
i am sure it is related to FP numbers.
i!=10 condition could be ok if you used integer variable for i
which might not possible in your situation.

Similar Messages

  • Bug in Code View font spacing - very annoying...

    Hello,
    I encounter a really annoying bug in the last version of Dreamweaver CC. The font in Code View is too spaced in the new version...
    See below for screenshots from CS6 and CC to see the difference.
    I'm using the font Courier New 9pt in both version...
    Please advise.
    Screenshots.
    Dreamweaver CS6
    Dreamweaver CC - Notice the font spacing

    I've managed to change the font to "Source Code Pro" in the Regeditor here: HKEY_CURRENT_USER\Software\Adobe\Dreamweaver CC\Font Preferences.
    Style, the font is not as good as it was with Courier New... And Courier New is not working... I'm looking to have a normal Courier New in CC... Or at least anothe similar font... Not light as Source Code Pro...
    Thanks
    See screenshots below:
    Source Code Pro In CC
    Courier New in CS6
    Courier New in CC..

  • WIKI Editor Bug with Code Blocks!

    This is a reminder of a problem that was talked lot of time and still an issue!
    For example this thread:
    http://social.technet.microsoft.com/Forums/en-US/8645bd04-474a-468f-8c0f-0f8678689437/code-block-edit-bug?forum=reportabug
    and Here is a new image to show the problem again:
    >> In the left you can see there is a code block without style formatting! The format messed up.
    looking at the HTML code we can notice the problem!
    All the style properties in regarding the code blocks disappeared
    1. the main div should be like this:
    <div class="reCodeBlock" style="border:1px solid #7f9db9;width:97%;overflow-y:auto;">
    but it become like this:
    <div class="reCodeBlock">
    each line in the code in in DIV and should be:
    <div style="background-color:#ffffff;">
    but it become:
    <div>
    >> I took a screenshot of the bug and I will take another screenshot in moment after I will fix it
    [Personal Site] [Blog] [Facebook]

    Is this the color problem, where all colors (not just in code) that are specified in the HTML with RGB values (decimal or hex) are lost when the article is saved in certain browsers? If so, we have found that even after the article is "fixed", if it
    is later saved in certain browers it will be broken again.
    I thought the fix was to replace all RGB values with standard color names. However, when the article is later saved, the standard color names can get converted back to RGB values, which get lost after another save (in the wrong browser). If this is the issue,
    it has been known for some time, but gets complicated and difficult to understand fully. It is believed that using Firefox or Chrome avoids the problem, but if someone later edits the article in IE, no matter how minor the edit, the colors can still be
    lost.
    Richard Mueller - MVP Directory Services

  • BUG: JDeveloper code editor shows valid static import call as error

    I've noticed what appears to be a bug in the JDeveloper code validator when dealing with static imports.
    The following classes demonstrate the problem:
    package test;
    public class Parent {
      public static void parentMethod() {
        System.out.println("called parentMethod.");
    package test;
    public class Child extends Parent {
      public static void childMethod() {
        System.out.println("called childMethod.");
    package test;
    import static test.Child.*;
    public class StaticInheritanceTest {
      public static void main(String[] args) {
        Child.childMethod();
        Child.parentMethod();
        childMethod();
        parentMethod();  //<-- this line is highlighted as an error
    }Notice how on lines 7 and 8 of StaticInheritanceTest, the code validator does recognise that both parentMethod and childMethod are static methods of the Child class.
    Since 'Child' has been statically imported, then parentMethod should be available. Although parentMethod is presented as an 'auto-suggest' at line 11 in StaticInheritanceTest, when you try to call it the code editor shows the call as an error and the Ctrl-Click (to drill down into the method) doesn't work.
    When I run the class, it compiles successfully and runs with the following output:
    called childMethod.
    called parentMethod.
    called childMethod.
    called parentMethod.This might seem like an obscure and theoretical problem, but I've hit this whilst using Mockito, which uses exactly this kind of inherited static method to provide matchers.

    Hi,
    thanks. Will file a bug. This seems to be a designtime only issue that does not present a show stopper.
    Frank

  • Bug with code folding margin

    Hi all.
    I'm using SQL Developer 3.1.07.42 for win32, windows 7.
    Not sure but probably bug - Tools|Preferences|Code Editor|Display|Show Code Folding Margin works only for current worksheet.
    If I open any another worksheet (no matter unshared it or not) this margin comes up even if checkbox Show Code Folding Margin is unchecked.
    Is it bug or feature?

    I can reproduce it, but I'm not sure where the bug lies.
    The worksheet and the code editor aren't the same (perhaps they should be) and the bug may be that the preference affects the current worksheet at all. The preference seems to work correctly for code editors.

  • [Bug] Disappearing Code

    Since upgrading to Flash CC my colleagues and I have noticed several isntances of code disappearing. We would write code in the FLA on the timeline, save, export, and see the movie working only to be scolded by QA an hour later saying we didn't do any work! We then return to the FLA to find missing blocks of code. Perhaps there is some issue with FLA saving in Flash CC x64? Or perhaps the new code editor (which still lags, I was hoping the new Flash could finally pull of a text editor without lag with reliable code completion) just randomly loses things?

    Yes, we are upgrading old CS6 projects. However all of the projects I've done in CC so far have been AS3. In some cases, we are even sharing projects between folks that still use CS6 and have noticed that movieclips containing groups of more movie clips do not port back too well but otherwise haven't had many problems.
    Both times my code disappeared though I was the only one who had touched the FLA all day and only used CC and it happened at some point in the middle of development. What I found most intriguing is that it hasn't yet removed code that caused an error. It is usually like we write a for loop like so:
    for(...) {
         // some code
    and occaisionally // some code will disappear but both the for loop and any code before and after will remain intact. My guess is that is related to saving or marking a file as saved. Perhaps I hit ctrl+s and the close the project and it lets me because the asterisk has disappeared but it was not yet complete. I had another save related bug in CS6 where for a couple months I would need to save twice in order to get the asterisk to go away every time and then one week it just started having to only save once again after no update. This happens on Windows 7 x64 by the way. I haven't had the chance to install Flash CC at home on my Windows 8.1 PC yet.

  • Small bug in code complete?

    I'm not sure how significant this bug is, but I think it's a bug.  Please advise.
    I defined a variable with the type UIComponent using code complete.  I Realized that I had chosen fl.core.UICompent instead of mx.core.UIComponent, which import statement was written by organized import.  Highlighting the type and choosing the correct type using code complete yielded something like this.
    var varname:mx.core.UIComponent;

    Jason,
    Thank your attention. Please, let me explain more clearly.
    I defined a variable statement with UIcomponent type using code completion.  ie
    import fl.core.UIComponent;
    var varname:UIComponent;
    Realizing I had chosen the wrong component, I highlight type UIComponent in my variable statement, and use the code completion to select type mx.core.UIComponent.  The result is this.
    import mx.core.UIComponent;
    var varname:mx.core.UIComponent;
    That's not right, is it?  Thank you.
    Garrick

  • Silverlight bug: Error code: 1001

    Recently Silverlight stopped working on my machine. In my development environment (Visual Studio 2012) I was getting the following vague error message:
    Line: 56
    Error: Unhandled Error in Silverlight Application
    Code: 1001   
    Category: RuntimeError      
    Message: 1001 An error has occurred.    
    MethodName:     
    Any websites I visited with Silverlight demos failed to load (only leaving a white space where the XAP should load)
    I tried installing Firefox, the same errors were happening there.
    I tried uninstalling and reinstalling.
    I tried uninstalling the Silverlight 5 SDK and Silverlight 4 SDK.
    None of this worked.
    Eventually after wasting a day searching up on this, I came across a Silverlight bug reported back in 2012. Apparently this is still a bug today in 2015 with Silverlight 5.
    Here are the details:
    https://connect.microsoft.com/VisualStudio/feedback/details/719317/silverlight-5-error-1001-font-filename-issue
    The fix was simple - I discovered a font file that had been recently installed. The font file name was Avenir.ttc but it contained versions of the font with & in the font name.
    I uninstalled this font (using Control panel > Fonts) and Silverlight started working immediately.
    If you ever have this issue, check your fonts directory!
    Thanks Microsoft!

    Hi,
    Thanks for sharing this information to us, it will be very beneficial for other community members who have similar questions. From your description, you have encountered an issue that is similar with the
    Silverlight 5 Error 1001 bug, if you could reproduce this bug again, I would suggest you submit a new feedback with the detail steps to let the Silverlight team to know this issue.
    Best Regards,
    Jambor   
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • DW CS6 horizontal scrolling bug in code/design view & code view alone

    I posted a video demonstrating the issue.
    Dreamweaver CS6 12.02 Build 6006
    http://www.youtube.com/watch?v=E7x5QZWNfk0
    Will there be a fix in the works?

    Believe me Thomas, I know exactly what you are going through.  I used to work for a company that used an archaic ecommerce platform called Marketlive.  It was a beast, but caused more problems than what it was worth.  But the companies that have grown with them have become so big they are afraid of change themselves.  Unfortunately, you just have to make with what you have.  Personally I'd still try to push about the paths because a find and replace could still be done ont he database side, although a bit more complicated than DW's because you would have to write a query to replace the values, but still possible.  Honestly, I would just do without the preview and just code as if DW is your text editor and then upload and test.  I wish there was a better answer, but even when I was in the tough situation that's what I worked with.  If they don't like how time consuming it can be that way, then you need to show management how you could save time and money.

  • Bug in code HELP!!! please

    When i put a term that isnt in my dictionary it says it isnt in dictionary which is what i want it to do but when i type one that works and it asks to do another one and i click yes or no it says it cant be found, and i cant find what i did wrong.
    dont mind my language in the code, =o
    import javax.swing.JOptionPane;
    public class InternetTranslater
         public static void main(String [] args)
              String[] Slang = {"lol","lmao","lmfao","rofl","roflmfao",
              "imo","oic","joo","pwn","pwns","owned","ttyl","brb",
              "gtg","g2g","lvl","IM","omg"};
              String[] Real = {"Laugh out Loud","Laugh my ass off",
              "Laughing my fucking ass off","Rolling on floor laughing",
              "Rolling on floor laughing my fucking ass off",
              "in my opinion","oh i see","You","Better than","Very awsome",
              "Severly beaten","Talk to you later","Be right Back",
              "Got to go","Good too go","level","Instant Message","oh my god"};
              String Term;
              int o = 1;
              JOptionPane.showMessageDialog(null,
              "This program is easy to use.","Start",
              JOptionPane.INFORMATION_MESSAGE);
              while(o == 1){
              Term = JOptionPane.showInputDialog("Please enter the chat term");
              for(int i=0;i<18;++i)
                   if(Term.equalsIgnoreCase(Slang))
                        JOptionPane.showMessageDialog(null,
                        Real[i],"Chat",
                        JOptionPane.INFORMATION_MESSAGE);
                        int p;
                        Object[] options = { "YES", "NO" };
                        p = JOptionPane.showOptionDialog(null,
                        "Click YES to do another",
                        "Warning", JOptionPane.DEFAULT_OPTION,
                        JOptionPane.WARNING_MESSAGE,
                        null, options, options[0]);
                        if(p == 0)
                             o = 1;
                        else
                             o = 0;
                        i = 0;          
                   if(i == 17)
                        JOptionPane.showMessageDialog(null,
                        "Term not found in the dictionary","Chat",
                        JOptionPane.ERROR_MESSAGE);
                        o = 1;
              System.exit(0);     

    You need to improve on:
    -not using magic numbers (e.g. replace 18 with slang.length)
    -using Java naming conventions (e.g. slang not Slang)
    -using useful classes such as Hashtable
    import javax.swing.JOptionPane;
    import java.util.Hashtable;
    public class InternetTranslator
         public static void main(String [] args)
              String[] slang = {"lol","lmao","lmfao","rofl","roflmfao",
              "imo","oic","joo","pwn","pwns","owned","ttyl","brb",
              "gtg","g2g","lvl","IM","omg"};
              String[] real = {"Laugh out Loud","Laugh my ass off",
              "Laughing my ******* ass off","Rolling on floor laughing",
              "Rolling on floor laughing my ******* ass off",
              "in my opinion","oh i see","You","Better than","Very awsome",
              "Severly beaten","Talk to you later","Be right Back",
              "Got to go","Good too go","level","Instant Message","oh my god"};
              Hashtable hashtable = new Hashtable();
              if (slang.length != real.length)
                   throw new RuntimeException("oops, my arrays don't match");
              for (int i = 0; i < slang.length; i++)
                   hashtable.put(slang.toLowerCase(), real[i]);
              //JOptionPane.showMessageDialog(null,
              //"This program is easy to use.","Start",
              //JOptionPane.INFORMATION_MESSAGE);
              while (true) {
                   Object o = JOptionPane.showInputDialog("<html>Please enter the chat term:<br>(press cancel to stop)</html>");
                   if (o == JOptionPane.UNINITIALIZED_VALUE || o == null)
                        break;
                   String s = o.toString().trim().toLowerCase();
                   String r = (String) hashtable.get(s);
                   if (r != null)
                        JOptionPane.showMessageDialog(null, "The full expression is: " + r, "Result", JOptionPane.INFORMATION_MESSAGE);
                   else
                        JOptionPane.showMessageDialog(null, "Expression not found!", "Uh-Oh!", JOptionPane.ERROR_MESSAGE);
              System.exit(0);

  • Help! Dreamweaver CS6 bug makes code disappear!

    I manage a dozen or so very stable websites in DW. Yesterday when I went to edit one, all the text was gone! I was able to workaround by pasting fresh text in Design mode from the web page. Today it's happening with another site. Both these sites have templates with editable regions.  It's not happening in all of my sites, nor on every page of the affected ones.
    Here's an example.
    The web page:
    The file:
    It's so bizarre! Any ideas?

    #1 If you're using a Mac with Mavericks, disable your system's "Dictation & Speech Recognition" features.
    #2  Validate code and fix reported errors.
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    #3 When DW starts acting weird for no other reason, the first thing to try is Deleting Corrupted Cache in DW
    http://forums.adobe.com/thread/494811
    #4  If that doesn't help, try Restore Preferences
    http://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html
    Nancy O.

  • BUG - Process Code Validator isn't working when creating a plsql process

    Steps to reproduce:
    1. New Process
    2. Type: PL/SQL
    3. Give it a name
    4. Enter process body (note I have just entered a random value which obviously isnt valid plsql code - no semi-colon, no procedure called abc, etc.)
    abc5. Click Create Process
    It succeeds!
    Alternatively, if I click next - the validator fires properly.
    Ta,
    Trent

    Some more observations in this regard
    <li>After opening the saved invalid PLSQL code for edit , it doesn't let you save it again , so the validation is firing at this point.
    <li>If you click on next and then click on back to return to PLSQL code page, and then press next once again, it validates and hence is working as expected.
    Now the weird part
    <li> If you check and then uncheck the "Do not validate PL/SQL code (parse PL/SQL code at runtime only)." checkbox the first time itself when creating , the validation will be fired.
    So my guess is that, the validation is fired based on the value of some item which is not set correctly during the first arrival on the PLSQL code page,possibly the item is null without any default value and the SQL query doesn't handle the null case (like an equals to check with NULL).

  • Bug report: code editor shows false PHP error

    I'm using Dreamweaver CC on an iMac.  The problem is that the PHP line error indicates an error in the code when there is no error.  This happens regularly when adding new values to an arrays that's formatted across multiple lines.  Please see the attached screenshot.

    When uploading an image on this forum, it seems to dramatically reduce the quality of the upload.  Here is a zoomed in image.

  • BUG? Code folding is unreliable.

    Code folding for PL/SQL does not work consistently.
    Some blocks won't fold although inner blocks can. When I click on the [-] for a non-folding block, all the [-] below that point in the file disappear.
    Hovering over the [-] shows that for blocks which don't fold, the scope of the block is only a single line, while for blocks which do fold, the scope is shown correctly.

    CREATE OR REPLACE
    PACKAGE BODY "CAP_PLUGINS" AS
    -- $Header: h:\\cvs/capmgmt/ddl/cap_plugins.pkb,v 1.3 2005/08/30 10:41:38 jim.smith Exp $
    -- $Log: cap_plugins.pkb,v $
    -- Revision 1.3  2005/08/30 10:41:38  jim.smith
    -- Implemented do_segment_space procedure
    -- Revision 1.2  2005/08/04 13:51:28  jim.smith
    -- Modified to ues new tablesructures
    -- Revision 1.1  2005/08/04 12:14:26  jim.smith
    -- Initial versions
    -- =======================================================================
    procedure do_table_counts(rundate in date,collection_name in varchar2,schema in varchar2) is
    type thingy is record (
              table_name varchar2(30),
              object_name varchar2(30),
              object_id number);
    type tablelist is table of thingy;
    tlist tablelist;
    collection_id number;
    new_co_id number;
    stmt varchar2(100);
    stat_rec collected_stat%rowtype;
    tcount number;
    begin
      -- FIRST GET THE collection id
      begin
        select coll_id
        into collection_id
        from collection
        where coll_name = collection_name;
      exception
        WHEN no_data_found then
          return;
        WHEN OTHERS THEN RAISE;
      end;
      -- get the list of tables
      -- including tables which are not in collection_objects
      begin
        select table_name,co_name,co_id
        bulk collect
        into tlist
        from dba_tables
          left outer join ( SELECT co_name ,co_id
                          from collection_objects
                            inner join collection
                            on co_coll_id=coll_id
                          where coLL_object_type='TABLE'
                          and coll_name=collection_name)
        on table_name=co_name
        where owner=schema;
      exception
        when no_data_found then
          return;
        when others then
          raise;
      end;
      --  Now process the list
      for i in tlist.first..tlist.last
      loop
        -- if the table isn't already in the collection, add it
        if tlist(i).object_name is null then
         elx_capmgmt.create_collection_object(collection_id,tlist(i).table_name,tlist(i).table_name,new_co_id);
        else
         new_co_id:=tlist(i).object_id;
        end if;
        -- collect the stats
        begin
        stmt:='select count(*)  from '||schema||'.'||tlist(i).table_name;
        execute immediate(stmt) into tcount;
        exception
          when others then
            raise;
        end;
        stat_rec.cs_co_id:=new_co_id;
        stat_rec.cs_timestamp:=rundate;
        stat_rec.cs_stat_value:=tcount;
        elx_capmgmt.CREATE_STATISTIC(stat_rec);
      end loop;
      commit;
    end;
    procedure do_tablespace_size ( rundate in date, collection_name in varchar2 ) is
    collection_id number ;
    new_co_id number;
    stat_rec collected_stat%rowtype;
    cursor tablespace_size is
    select * from (
      SELECT T.TABLESPACE_NAME TBLSPC,
             ROUND(sum(T.BYTES)) TOTAL
      from  (select * from DBA_DATA_FILES union select * from dba_temp_files) T
       GROUP BY  TABLESPACE_NAME
       ) left outer join ( SELECT coll_id,co_id,co_name
                          from collection_objects
                            inner join collection
                            on co_coll_id=coll_id
                          where coll_name=collection_name)
        on tblspc = co_name;
    ts2 tablespace_size%rowtype;
    begin
      -- FIRST GET THE collection id
      begin
        select coll_id
        into collection_id
        from collection
        where coll_name = collection_name;
      exception
        WHEN no_data_found then
          return;
        WHEN OTHERS THEN RAISE;
      end;
      -- now get the data
      begin
        for ts in tablespace_size
        loop
          ts2:=ts;
          -- if the tablespace is not part of the collection, add it
          if ts.co_id is null then
            elx_capmgmt.create_collection_object(collection_id,ts.tblspc,ts.tblspc,new_co_id);
          else
            new_co_id:=ts.co_id;
          end if;
          -- now load the statistics
          stat_rec.cs_co_id:=new_co_id;
          stat_rec.cs_timestamp:=rundate;
          stat_rec.cs_stat_value:=ts.total;
          elx_capmgmt.create_statistic(stat_rec);
        end loop;
      exception
        when dup_val_on_index then
          return;
        when others then
          raise;
      end;
    end;
    procedure do_tablespace_usage ( rundate in date, collection_name in varchar2  ) is
    cursor tablespace_usage  is
    select * from (
      SELECT T.TABLESPACE_NAME TBLSPC,
             ROUND(sum(T.BYTES)) TOTAL
      from  DBA_segments  T
       GROUP BY  TABLESPACE_NAME
       ) left outer join ( SELECT coll_id,co_id,co_name
                          from collection_objects
                            inner join collection
                            on co_coll_id=coll_id
                          where coll_name=collection_name)
        on tblspc = co_name;
    collection_id number ;
    new_co_id number;
    stat_rec collected_stat%rowtype;
    begin
      -- FIRST GET THE collection id
      begin
        select coll_id
        into collection_id
        from collection
        where coll_name = collection_name;
      exception
        WHEN OTHERS THEN RAISE;
      end;
      -- now get the data
      begin
        for ts in tablespace_usage
        loop
          -- if the tablespace is not part of the collection, add it
          if ts.co_id is null then
            elx_capmgmt.create_collection_object(collection_id,ts.tblspc,ts.tblspc,new_co_id);
          else
            new_co_id:=ts.co_id;
          end if;
          -- now load the statistics
          stat_rec.cs_co_id:=new_co_id;
          stat_rec.cs_timestamp:=rundate;
          stat_rec.cs_stat_value:=ts.total;
          elx_capmgmt.create_statistic(stat_rec);
        end loop;
      exception
        when others then raise;
      end;
    end;
    procedure do_tablespace_free ( rundate in date, collection_name in varchar2  ) is
    cursor tablespace_free  is
    select * from (
      SELECT T.TABLESPACE_NAME TBLSPC,
             ROUND(sum(T.BYTES)) TOTAL
      from  DBA_free_space  T
       GROUP BY  TABLESPACE_NAME
       ) left outer join ( SELECT coll_id,co_id,co_name
                          from collection_objects
                            inner join collection
                            on co_coll_id=coll_id
                          where coll_name=collection_name)
        on tblspc = co_name;
    collection_id number ;
    new_co_id number;
    stat_rec collected_stat%rowtype;
    begin
      -- FIRST GET THE collection id
      begin
        select coll_id
        into collection_id
        from collection
        where coll_name = collection_name;
      exception
        WHEN OTHERS THEN RAISE;
      end;
      -- now get the data
      begin
        for ts in tablespace_free
        loop
          -- if the tablespace is not part of the collection, add it
          if ts.co_id is null then
            elx_capmgmt.create_collection_object(collection_id,ts.tblspc,ts.tblspc,new_co_id);
          else
            new_co_id:=ts.co_id;
          end if;
          -- now load the statistics
          stat_rec.cs_co_id:=new_co_id;
          stat_rec.cs_timestamp:=rundate;
          stat_rec.cs_stat_value:=ts.total;
          elx_capmgmt.create_statistic(stat_rec);
        end loop;
      exception
        when others then raise;
      end;
    end;
    procedure do_tablespaces(rundate in date) is
      running_job_id number:=-1;
    begin
      elx_utilities.make_job_log_entry(running_job_id,elx_utilities.STAGE_ENTRY,0,'Capmgmt.do_tablespace_size','0');
      do_tablespace_size(rundate,'TBLSPCSIZE');
      elx_utilities.make_job_log_entry(running_job_id,elx_utilities.STAGE_ENTRY,0,'Capmgmt.do_tablespace_free','0');
      do_tablespace_free(rundate,'TBLSPCFREE');
      elx_utilities.make_job_log_entry(running_job_id,elx_utilities.STAGE_ENTRY,0,'Capmgmt.do_tablespace_used','0');
      do_tablespace_usage(rundate,'TBLSPCUSED');
      commit;
    end;
    procedure do_segment_space(rundate in date,collection_name in varchar2,schema in varchar2) is
    type thingy is record (
              segment_name varchar2(30),
              total_size number,
              coll_id number,
              object_id number,
              object_name varchar2(30));
    type segmentlist is table of thingy;
    slist segmentlist;
    collection_id number;
    new_co_id number;
    stat_rec collected_stat%rowtype;
    begin
      -- FIRST GET THE collection id
      begin
        select coll_id
        into collection_id
        from collection
        where coll_name = collection_name;
      exception
        WHEN no_data_found then
          return;
        WHEN OTHERS THEN RAISE;
      end;
      begin
        select *
        bulk collect
        into slist
        from ( select segment_name, sum(size2 ) totalsize
        from (     select segment_name,' ',segment_type,bytes size2
              from dba_segments
              where owner=SCHEMA
              and segment_type='TABLE'
              union
              select i.table_name,segment_name,segment_type,s.bytes size2
              from dba_segments s
                inner join dba_indexes i
                on segment_name=index_name
              where s.owner=SCHEMA
              and segment_type='INDEX')
      group by segment_name )
      left outer join ( SELECT coll_id,co_id,co_name
                      from collection_objects
                        inner join collection
                        on co_coll_id=coll_id
                      where coLL_object_type='SEGMENT'
                      and coll_name=collection_name)
      on segment_name = co_name;
      exception
        when others
          then raise;
      end;
      for i in slist.first..slist.last
      loop
        -- if the table isn't already in the collection, add it
        if slist(i).object_name is null then
         elx_capmgmt.create_collection_object(collection_id,slist(i).segment_name,slist(i).segment_name,new_co_id);
        else
         new_co_id:=slist(i).object_id;
        end if;
        -- collect the stats
        stat_rec.cs_co_id:=new_co_id;
        stat_rec.cs_timestamp:=rundate;
        stat_rec.cs_stat_value:=slist(i).total_size;
        elx_capmgmt.CREATE_STATISTIC(stat_rec);
      end loop;
    null;
    end;
    END;

  • BUG?: Code Editor – Completion Insight  - Autogenerate GROUP BY clause

    With the “Autogenerate GROUP BY clause” enabled the following problem occurs:
    Coding an inline select in an aggregate query:
      SELECT   (SELECT   DEPARTMENT_NAME
                  FROM   departments d
                 WHERE   d.department_id = e.department_id) dep
            , JOB_ID
            , SUM (salary)
        FROM   employees e
    GROUP BY   department_id, job_idCode group-by-autogenerate transforms this from time to time into:
      SELECT   (SELECT   DEPARTMENT_NAME
                  FROM   departments d
                 WHERE   d.department_id = e.department_id) dep
                 , JOB_ID
                 , SUM (salary)
        FROM   employees e
        GROUP BY (SELECT   DEPARTMENT_NAME
                  FROM   departments d
                 WHERE   d.department_id = e.department_id), JOB_IDWhich results in:
    ORA-22818. 00000 - "subquery expressions not allowed here"
    *Cause:    An attempt was made to use a subquery expression where these
    are not supported.
    *Action:   Rewrite the statement without the subquery expression.
    when trying to run it.
    (version 2.1.0.6.3; build MAIN-63.73; Windows XP)

    Duplicate of
    2.1 EA1 - Auto Group By inserted when unwanted/expected

Maybe you are looking for

  • Regarding SY-SAPRL

    Hi In ECC 6 , System Variable SY-SAPRL  returns the version of "WAS" and not R/3 Application. Is there any system variable available to replace this variable to get the same output as in 4.6 c. If any other solution is there , please let me know. Poi

  • Problem in IDOC

    Hi, I am working on IDOC to Mutiple target systems..and the IDOC is extended at the ECC side..and my IDoc extension looks is like this. ZX/AFS/DELVRY03. i have imported the idoc succesfully in PI and dragged it to the source message of message mappin

  • Install error -look at the code. plz help

    I have the simple applet that I'm able to compile and load on to a JCOP10 cartd. When I try to install the applet so that I can start interacting with it, I get the following error. How do I go beyond this point? I'll appreciate your help. JCOP shell

  • Using Studio to develop DII Client for DiningGuide example

    Hi, I am trying to develop a DII client to the DiningGuide example from the Java Studio Enterprise Tutorials and Code Camps: http://developers.sun.com/prodtech/javatools/jsenterprise/learning/tutorials/index.html I am using Studio6 with Application S

  • How to create report category for PNPCE ldb in ECC 6.0

    Hi Experts, How to create report category for the LDB pnpce in ECC6.0 Thanks in Advance, Regards, IFF