CASE Statement not working.

I have following case statement in formula to display a specific image if the value from a column is a certain color:
CASE "Facts"."Indicator" WHEN 'Green' THEN '<img src="res/s_blafp/images/green_image.gif" title="Green" </>' WHEN 'Yellow' THEN '<img src="res/s_blafp/images/yellow_image.gif" title="Yellow" </>' WHEN 'Red' THEN '<img src="res/s_blafp/images/red_image.gif" title="Red" </>' END
So far when I use the case statement it only dislpays the following instead of the actual image.
<img src="res/s_blafp/images/green_image.gif" title="Green" </>'

shaolin_obiee wrote:
I have following case statement in formula to display a specific image if the value from a column is a certain color:
CASE "Facts"."Indicator" WHEN 'Green' THEN '<img src="res/s_blafp/images/green_image.gif" title="Green" </>' WHEN 'Yellow' THEN '<img src="res/s_blafp/images/yellow_image.gif" title="Yellow" </>' WHEN 'Red' THEN '<img src="res/s_blafp/images/red_image.gif" title="Red" </>' END
So far when I use the case statement it only dislpays the following instead of the actual image.
<img src="res/s_blafp/images/green_image.gif" title="Green" </>'Take a look at this link:
http://gerardnico.com/wiki/dat/obiee/image

Similar Messages

  • MDX simple case statement not working?

    hi all - any idea what is wrong with this MDX statement? it is returning blank. I am trying to add a calculated measure using the below code but it is not working. thanks for the help.
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER = "Cash" THEN
    ([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END

    If you are checking for the 'Cash' member of the Account Name hierarchy, do you need to do something like this?
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER IS [Accounts].[Account Name].[Cash] THEN([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END
    Regards,
    MrHH

  • Case statement not working in rpd

    Hi Gurus,
    I am giving case statement for the exchange rate column#1 from original exchange rate column , the data of column is like
    0.0
    0.0
    0.1
    0.2
    1.2
    1.3
    1.4
    so here i dont want 0.0 instead of that i want 1.0 so whenever in next derived column i will calculate it would be this derived exchange rate#1 * inv amt = desired amt
    for the same I used different diff. case statement but still 0.0 is not going , I am giving like
    1) CASE WHEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" = 0.0 THEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" * 1.0 ELSE BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" END
    2) CASE WHEN BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" = 0.0 THEN 1.0 ELSE BookingsBacklog."Fact USJ Sales Billing"."Loc Exchange Rate" END
    nothing is working , result remains same, any quick help would be apprciated
    Thanks,

    Once again, could you write all information, like I described here my example.
    When tried the same it works.
    TABLE.COLUMN1 is from dimension.
    TABLE.COLUMN1 is DOUBLE in the physical layer (in Oracle it is NUMBER(8,2)) and view/data gives:
    TABLE.COLUMN1
    12.99
    0.00
    0.20
    In the RPD I made new logical columns.
    EXPR:
    CASE WHEN "Presentation area".TABLE.COLUMN1 = 0.0 THEN 1.0 ELSE "Presentation area".TABLE.COLUMN1 END
    EXPR2:
    CASE WHEN "Presentation area".TABLE.COLUMN1 = 0 THEN 1 ELSE "Presentation area".TABLE.COLUMN1 END
    Test in Answers:
    COLUMN1----EXPR----EXPR2
    12.99---------12.99----12.99
    0.00-------------1.0--------1.0
    0.20------------0.20------0.20
    I leaved data format on the column properties as default (override default data format not checked).
    I don't see where is the problem.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Case statement Not working with Oracle version 10g

    Below is code , which works on 11r2 but not on 10g.
    declare
    v1 VARCHAR2(200);
    begin
    select version into v1 from DBA_REGISTRY WHERE COMP_NAME LIKE '%Catalog Views%';
    CASE
          WHEN v1 like '10.2%' THEN
    DBMS_OUTPUT.PUT_LINE('it is  10.2');
    dbms_streams_auth.grant_admin_privilege('GGADMIN');
          WHEN v1 like '11.1%' THEN
    DBMS_OUTPUT.PUT_LINE('it is  11.1');
    dbms_streams_auth.grant_admin_privilege('GGADMIN');
    EXECUTE IMMEDIATE 'grant become user to GGADMIN';
          WHEN v1 like '11.2.0.3%' THEN
    DBMS_OUTPUT.PUT_LINE('it is  11.2.0.3');
    dbms_goldengate_auth.grant_admin_privilege('GGADMIN');
        END CASE;
    end;
    /I dont know when i run code in 10.2 it still looks for dbms_goldengate_auth
    and error out.
    dbms_goldengate_auth.grant_admin_privilege('GGADMIN');
    ERROR at line 18:
    ORA-06550: line 18, column 1:
    PLS-00201: identifier 'DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE' must be declared
    ORA-06550: line 18, column 1:
    PL/SQL: Statement ignoredif I comment dbms_goldengate_auth it returns perfect result.
    it is  10.2
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.03Is there any other way around ????
    Edited by: 949509 on Jan 27, 2013 6:57 PM

    949509 wrote:
    Can you please tell me How i can execute dynamic sql via execute immediate.In a very simialr was as you did the grant of become user in your code. SOmething like:
    declare
       v1          VARCHAR2(200);
       l_grant_str VARCHAR2(1000);
    begin
       select version into v1 from DBA_REGISTRY WHERE COMP_NAME LIKE '%Catalog Views%';
       CASE
          WHEN v1 like '10.2%' THEN
             DBMS_OUTPUT.PUT_LINE('it is  10.2');
             l_grant_str := 'dbms_streams_auth.grant_admin_privilege(''GGADMIN]'')';
          WHEN v1 like '11.1%' THEN
             DBMS_OUTPUT.PUT_LINE('it is  11.1');
             l_grant_str := 'dbms_streams_auth.grant_admin_privilege(''GGADMIN'')';
             EXECUTE IMMEDIATE 'grant become user to GGADMIN';
          WHEN v1 like '11.2.0.3%' THEN
              DBMS_OUTPUT.PUT_LINE('it is  11.2.0.3');
             l_grant_str := 'dbms_goldengate_auth.grant_admin_privilege(''GGADMIN'')';
       END CASE;
       execute immediate l_grant_str;
    end;John

  • CLOB with case statement not working getting error

    Can anyone help on this
    I write this sql
    select Case when to_clob(PROPERTY) = 'is_intradesk=Y' then 'Internal' end
    from JPM_CP;
    Where PROPERTY column is clob column and its giving the error "ORA-00932: inconsistent datatypes: expected - got CLOB"
    Is it not possible to use clob columns with case or decode !

    Its working but it does not fulfill my purpose
    In you answer it is looking for position right! means, does the column contain the value('Intradesk=Y' ) or not. means
    I am looking for exact match with CLOB column values, that is Clob column(PROPERTY) contains the exact value that value which I am comparing with i.e 'Intradesk=Y'
    I need this
    select * from table where clob_column = 'value' (exact).
    Edited by: sajalkdas on Feb 4, 2011 3:28 PM

  • MDX Case Statement not working

    Hi have written the following MDX statement to create a new column calledl 'Aon Group' and group the Policy Broker Names into 2 values, either 'Aon' or 'All Other':
    WITH Member [Measures].[Aon Group]
    as
    Case when [Broker].[Policy Broker Name - Big 6].[Policy Broker Name - Big 6].&[Aon] Then "Aon"
    Else "All Other"
    End
     SELECT NON EMPTY 
     { [Measures].[Net Premium],[Measures].[Aon Group] } 
     ON COLUMNS, 
     NON EMPTY 
     { ( [Broker].[Policy Broker Name].[Policy Broker Name].ALLMEMBERS ) } 
    ON ROWS 
    FROM [Broker Premium]
    Here are my results:
    It's giving me #Error and the actual 'Aon' Policy Broker Name is showing 'All Other', which is opposite of what I want.
    thanks

    Hi Scott,
    Here is a query for your reference.
    With Member [Measures].[Test]
    As
    Case [Product].[Category].CurrentMember.Name
    When [Product].[Category].&[1].Name Then "Bike"
    Else "Others"
    End
    Select {[Measures].[Test],[Measures].[Internet Sales Amount]} on columns,
    [Product].[Category].[Category].members on rows
    from [Adventure Works]
    Results
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Case statement not working as expected

    I get this error having the group by clause: ORA-00979: not a GROUP BY expression
    I get this error with out it: ORA-00937: not a single-group group function
    If I add sp.PUBLISHER_ID to the group by, my data comes out on separate lines like this:
    BT jlloyd ALLEN IVERSON B 0 3 0
    BT jlloyd ALLEN IVERSON B 1 0 0
    What am I doing wrong?
    select distinct office_id,user_id,
    nvl(customer, profile_name),
    nvl(account, profile_name),
    profile_name,
    profile_type,
    case when sp.PUBLISHER_ID = 503
    then count(distinct sp.instance_id)
    else 0 end as MR_Reports ,
    case when sp.PUBLISHER_ID = 501
    then count(distinct sp.instance_id)
    else 0 end as QV_Reports,
    case when sp.PUBLISHER_ID = 3533
    then count(distinct sp.instance_id)
    else 0 end as BS_Reports
    from vw_profile_info p join SOLD_PUBLISHERS sp
    on p.profile_id = sp.profile_id
    join SOLD_SEGMENTS ss
    on ss.profile_id = sp.PROFILE_ID
    and ss.instance_id = sp.instance_id
    and ss.BASKET_ID = sp.basket_id
    join publishers p
    on p.publisher_id = sp.publisher_id
    where sp.publisher_id in (501,503,3533)
    and sp.PUBLISHED_DATE between to_date('10/01/2005','mm/dd/yyyy') and
    to_date('10/31/2005','mm/dd/yyyy')
    and profile_name = 'ALLEN IVERSON
    group by office_id,user_id,
    nvl(customer, profile_name),
    nvl(account, profile_name),
    profile_name,
    profile_type

    There are couple of ways, one of them would be
    select office_id,
           user_id,
           nvl(customer, profile_name),
           nvl(account , profile_name),
           profile_name,
           profile_type,
           sum(decode(sp.PUBLISHER_ID,  503, 1, 0) MR_Reports,
           sum(decode(sp.PUBLISHER_ID,  501, 1, 0) QV_Reports,
           sum(decode(sp.PUBLISHER_ID, 3533, 1, 0) BS_Reports
    from vw_profile_info p join SOLD_PUBLISHERS sp
         on p.profile_id = sp.profile_id
         join SOLD_SEGMENTS ss
         on ss.profile_id = sp.PROFILE_ID
         and ss.instance_id = sp.instance_id
         and ss.BASKET_ID = sp.basket_id
         join publishers p
         on p.publisher_id = sp.publisher_id
    where sp.publisher_id in (501,503,3533)
    and sp.PUBLISHED_DATE between to_date('10/01/2005','mm/dd/yyyy') and to_date('10/31/2005','mm/dd/yyyy')
    and profile_name = 'ALLEN IVERSON'
    group by office_id,
             user_id,
             nvl(customer, profile_name),
             nvl(account , profile_name),
             profile_name,
             profile_type

  • Case when statement not working

    hi there, I am trying to work out how to get my case statement to work.
    I have got the following code. 
    select pthproto.pthdbo.cnarole.tpkcnarole, pthproto.pthdbo.cnaidta.formataddr as formataddr, cnaidta.dateeffect as maxdate, isnull(cast (pthproto.pthdbo.cnaaddr.prefix1key as varchar (50)),'') + ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix2key
    as varchar (50)),'')+ ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix3key as varchar (50)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.houseidkey as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component1
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component2 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component3 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component4
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component5 as varchar (100)),'') as mailaddress, row_number() over(partition by pthproto.pthdbo.cnarole.tpkcnarole order by cnaidta.dateeffect desc) as rn into #address from pthproto.pthdbo.cnarole
    inner join pthproto.pthdbo.cnaidty on cnarole.tfkcnaidty =cnaidty.tpkcnaidty inner join pthproto.pthdbo.cnaidta on cnaidty.tpkcnaidty = cnaidta.tfkcnaidty inner join pthproto.pthdbo.cnaaddr on cnaidta.tfkcnaaddr = cnaaddr.tpkcnaaddr order by cnaidta.dateeffect
    select *, case when mailaddress is not null then mailaddress else formataddr end as test from #address where tpkcnarole = '18306695'
    The case when statement is struggling with how i have created the column mailaddress.  As it does seem to understand when it is null.  In the example I have got there is no value in any of the columns to create
    the mailaddress.  Hence why I am referencing it from elsewhere.  Due to having a way on the system where it picks up data from 2 different places.    The mailaddress is always correct if there is one, hence why
    trying to reference that one first.  So how do i change this case when statement to work ?            

    It's ok I have fixed my own problem
    when
    (mailaddress
    is
    null 
    or mailaddress

    then formataddr
    else mailaddress
    end
    as test
    case

  • Case tatement not working within a cursor

    I am having a problem getting the case statement to work within a cursor in a store procedure in our 2008 r2 environment. Below is the cursor that I'm referring too. Any suggestions would be greatly appreciated.
    SET NOCOUNT ON;
    DECLARE @part_id as int, @WAREHOUSE_ID AS varchar(80), @SAFETY_STOCK_QTY AS int;
    DECLARE parts_cursor CURSOR FOR
    select part_id ,WAREHOUSE_ID,  coalesce(SAFETY_STOCK_QTY,0) from PART_WAREHOUSE where Part_ID in (SELECT distinct  #FLINES03.Part from #FLINES03)
    OPEN parts_cursor
    FETCH NEXT FROM parts_cursor
    INTO @part_id, @WAREHOUSE_ID, @SAFETY_STOCK_QTY
    WHILE @@FETCH_STATUS = 0
    BEGIN
      CASE @WAREHOUSE_ID
        WHEN 'AAA' THEN UPDATE #FLINES03 SET WHS1_SS_QTY = @SAFETY_STOCK_QTY WHERE #FLINES03.PART = @part_id AND #FLINES03.WHS1 = @WAREHOUSE_ID
        WHEN 'BBB'THEN UPDATE #FLINES03 SET WHS2_SS_QTY = @SAFETY_STOCK_QTY WHERE #FLINES03.PART = @part_id AND #FLINES03.WHS2 = @WAREHOUSE_ID
        WHEN 'CCC'      THEN UPDATE #FLINES03 SET WHS3_SS_QTY = @SAFETY_STOCK_QTY WHERE #FLINES03.PART = @part_id AND #FLINES03.WHS3 = @WAREHOUSE_ID 
      END   
      FETCH NEXT FROM parts_cursor INTO @part_id, @WAREHOUSE_ID, @SAFETY_STOCK_QTY
    END
    CLOSE parts_cursor
    DEALLOCATE parts_cursor

    CASE is an expression, not a statement. It means you can not execute code. You need to change your code to IF statements, e.g.
    IF @WAREHOUSE_ID = 'AAA'
        UPDATE ....
    IF 
        UPDATE ...
    Also, what is the purpose of using cursor? Can you provide the whole picture of what you're trying to achieve?
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • False/True Case is not working. Please Help!

    Dear all,
    I attached my block diagram, one attachment refers to true case and the other refers to false case.
    My program runs like this: when i run the vi , after homing the motor (there is home.vi), DAQ is collecting the values in the while loop, and according to the DAQ's value, motor should run the False/True case but it does not
    As a result: true/false case is not working which is located at the outside of the loop(bottom side of the block diagram)
    When i put the the True/false inside the Loop(DAQ's loop) , then it is working. But this brings lots of problem, two of them is: 
    1-) When the DAQ values goes below to "50" then it turns to true case again,
    2-) The false case has stop.vi which cause to motor stop every iteration of the loop.
    So that is why i put True/False case out of the loop but now it is not working at all.
    Please answer, waiting response.
    Thank you,
    Have a nice day,
    Kind Regards.
    Attachments:
    OutloopTrueMode.pdf ‏432 KB
    OutofLoopNotWorking.pdf ‏443 KB

    Salander wrote:
    Dear GerdW,
    Thank you for reply, You can see my answers written with red.
    "As long as the case structure is located outside the loop it will not be called before the loop stops. THINK DATAFLOW!"
    - The case structure need to run same time with the loop, because as you can see from the attachments the case structure is also integrated with DAQ values.. loop is continuous till i press the stop button.  So what i understand that this case structure will not work because loop is continuous?? Cant we upgrade the vi. or do smthg that it can be able to work same time with the loop??
    Kind Regards.
    You have to place the case structure inside the while loop ( Any significance is there on placing the case outside the loop? ).
    Salander wrote:
    Dear GerdW,
    Btw. it would be much more useful to attach real pictures or, even better, the VI...
    Because most of the people dont have my "motor controller's labview drivers"  I attached as a PDF file which is very popular.
    Not Really * .png file ( vi snippet ) is much more popular here in Discussion Forum
    The best solution is the one you find it by yourself

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Case Statement Not returning resutlset Varbinary

    Declare @val varbinary
    set @val = cast('123456789' as varbinary) 
    select @val as value -- Varbinary Value Result
    Declare @check bit
    set @check= 1
    --THis Case Statement Not returning Result set in Varbinary  . 
    select case @check when 1 then @val else 1 end as value

    See the below part from MSDN documentation reg return type
    Returns the highest precedence
    type from the set of types in result_expressions and
    the optional else_result_expression. 
    http://msdn.microsoft.com/en-IN/library/ms181765.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Hide statement not working

    Hi experts,
    i am using hide statement but it is not working..The problem with it is that after line selection the variable on which i have used hide is carrying the last value of internal table always..<< Removed >>
    Regards,
    Raman
    Edited by: Rob Burbank on Jun 30, 2009 10:41 AM

    I am sending a test program with same problem...iin this after line selection the field variable emp-name is displayin only last entry of internal table...
    *& Report  ZBASICX12
    REPORT  ZBASICX12.
    INITIALIZATION.
      DATA: BEGIN OF ITAB OCCURS 0,
            EMPID  TYPE ZTEMP-EMPID,
            EMPNAME TYPE ZTEMP-EMPNAME,
            END OF ITAB.
    START-OF-SELECTION.
      SELECT EMPID EMPNAME FROM ZTEMP INTO TABLE ITAB.
      SORT ITAB BY EMPID.
      LOOP AT ITAB.
        WRITE: / ITAB-EMPID HOTSPOT.
        HIDE ITAB-EMPID.
      ENDLOOP.
    END-OF-SELECTION.
    AT LINE-SELECTION.
      CASE SY-LSIND.
        WHEN 1.
          WRITE: ITAB-EMPNAME.
      ENDCASE.

  • SQL Statement not works using functions or subqueries-MAXDB

    Hello All,
    I created an ABAP program to select information about country(table: T005) with the country names (Table: T005T). I tried to create a sql query with a sql subquery to select everything but for some reason that I don't know it doesn't work. Please find the query below.
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, `
               &&       `(SELECT landx `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ), `
               &&       `(SELECT natio `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ) `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Well, the query above works but the fields LANDX and NATIO are in blank in ALL THE CASES, even with information registred in table T005T.
    So, exploring the SDN forum and after read some documents regarding ADBC, I create a function to handle this sql select and get the correctly the missing informations, but, still don't work. Please find the function below:
    CREATE FUNCTION select_landx (land1 CHAR(3)) RETURNS CHAR(15)
    AS
      VAR landx CHAR(15);
      DECLARE functionresult CURSOR FOR
      SELECT spras, land1, landx
         FROM SAPNSP.t005t
         WHERE spras = 'EN'
             AND land1 = :land1;
         IF $count IS NULL THEN <- | $count is always 0, my SELECT
           BEGIN                                 it's not work but I don't know why
             CLOSE functionresult;
             RETURN NULL;
           END
         ELSE
           SET $rc = 0;
           WHILE $rc = 0 DO
           BEGIN
             FETCH functionresult INTO :landx;
           END;
         CLOSE functionresult;
         RETURN landx;
    Calling the function in a SQL statement:
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, select_landx(?) landx `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Any comments ?
    Best regards,
    Arthur Silva

    Hello,
    Thank's a lot, it works. It's funny because the given solution works using only abap codes.
    It may be happens because the abap interpretor send the sql statement to the db interface that handle the code in the another way.
    Thanks again, it was driving me crazy.
    Best regards,
    Arthur Silva

  • Import statement not working

    i created a package named "pkg1", it contains 4 classes named
    1) Base
    2) Subclass1 (extends Base)
    3) Subclass2 (extends Subclass1)
    4) Subclass3 (extends Subclass2)
    now when i try to use the package using
    import pkg1.*
    and in main method, if i write,
    Subclass3 obj = new Subclass3();
    It does not work, error msg says "makes sure Subclass3 is in the correct sub-directory."
    However, when i tried
    import pkg1.Subclass3;
    It worked fine, Why is then import pkg1.* not working??

    I don't think that's going to help.
    Try and see.
    When the java compiler looks for a class
    pkg1.Subclass1 it looks for pkg1\Subclass1.java
    relative to the current directory and
    pkg1\Subclass1.class relative to each directory on
    the classpath.
    When the javac compiler (at least version 1.4) looks for a dependent class, it looks in the Classpath directories. It only looks relative to the current directory if the current directory is in the Classpath. When it looks for a dependent class, it looks for both .java and .class files. If it only finds a .java file or the .java file is newer than a .class file, it will try to compile the file.
    You need to compile from the directory above
    pkg1, in this case (unfortunately) d:\
    This makes it sound like it is a requirement to compile from the directory. It isn't required.

Maybe you are looking for

  • Help - problems waking up

    Over the last week I have started to have problems waking up my iMac. The problem occurs randomly with the following symptoms: - the screen stays dark but the hard drive and fan start, with the fan gradually building to a dull roar. I have reset the

  • Cover art synchs on Ipod, but music doesn't.

    Hello, I've purchased a bunch of songs from an Itunes gift card. All the songs loaded onto my G5 as expected. But when I manually synched them onto my Ipod, the album art shows up, but not the music. When I attempt to play the song, the artwork appea

  • PO from SO in depot plant wihtout thirdt party

    Hi,   We have one depot plant after receving the SO from customer the SO is entered in the system  we create one separate PO on or vendor as per the  materials and qty. in the SO, we receievd the material from vendor, make the delivery and invoice on

  • About 2.0.1

    whats the new 2.0.1 about? anything new or any improvement? thanks

  • I lost my foto after upgrading to IOS 8.1

    Please help!!!!... My Ipod crashed when installing IOS 8.1. After restoring my Ipod using ITunes, I lost all my 6000++ fotos!!! Please help me how to retrieve it...