Help: Anything wrong with this spatial query?

The error messages are as follows:
SELECT * FROM M_RGSERVERDB1 WHERE sdo_relate(M_RGSERVERDB1.geometry, mdsys.sdo_geometry(2003,NULL,NULL,mdsys.sdo_elem_info_array 1,1003,3),mdsys.sdo_ordinate_array(-97.3 ,35.1 , -97.1 , 35.3)),'mask=COVERS querytype=window') = 'TRUE'
java.sql.SQLException: ORA-06509: PL/SQL: ICD vector missing for this package
ORA-06512: at "JZHANG.MD", line 1723
ORA-06512: at "JZHANG.MDERR", line 8
ORA-06512: at "JZHANG.SDO_3GL", line 57
ORA-06512: at line 1
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.jav
a:1681)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1870)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
538)
at
TestSpatial.main(TestSpatial.java:60)
null

Hi, Jean-Marc:
Thanks very much for your help. However, I don't think I missed the parenthesis after I double-checked it-- maybe due to copy/paste.
In fact, SQLPLUS will remind me if I miss a parenthesis. The following is the SQL that casuse the problem.
SELECT * FROM M_RGSERVERDB1 WHERE sdo_relate(M_RGSERVERDB1.geometry, mdsys.sdo_geometry(2003,NULL,NULL,mdsys.sdo_elem_info_array (1,1003,3),mdsys.sdo_ordinate_array(-97.3 ,35.1 , -97.1 , 35.3)),'mask=COVERS querytype=window') = 'TRUE';
Do you have any ideas on version compatibility of 8.1.7 and 8.1.6 which might casue the problem?
Thanks.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jean-Marc Prevost ([email protected]):
You have a missing opening parenthesis just after mdsys.sdo_elem_info_array.
You have:
mdsys.sdo_elem_info_array 1,1003,3)
You should have:
mdsys.sdo_elem_info_array (1,1003,3)
Hope this helps!<HR></BLOCKQUOTE>
null

Similar Messages

  • Do you see anything wrong with this GL mapping in a cube?

    hi,
    Can you verify if something is wring with this mapping:
    In model 1:
    0fi_gl_4 --> 0figl_O02 --> 0figl_C02
    the standard cube shows the following key figures and I mapped them to the following fields from the datasource:
    DMSOL(in datasource) to 0Debit_LC (in DSO) to 0Debit (in cube)
    DMHAB(in datasource) to 0Credit_LC (in DSO) to 0Credit (in cube)
    In model 2:
    0fi_gl_6 --> 0figl_C01
    the standard cube shows the following key figures and I mapped them to the following fields from the datasource:
    UMSOL(in datasource) to 0Debit (in cube)
    UMHAB(in datasource) to 0Credit (in cube)
    1. Do you see anything wrong with this mapping? And what is the solution?
    2. What is the problem with the mapping if both cubes sit under the same multiprovider, since 0debit and 0credit are from differnt souce fields?
    thnx

    Hi,
    Thanks for the explanation.
    on #1,
    if my goal is to provide a sort of trial balance, credits and debits as two columns, will it be ok to assume that it should be Local Currency or could it be Document Currency, Local Currency 2 or Local Currency 3? If the latter, then how do I decide?
    on #2,
    i. why will there be difficulty creating a union between the two?
    ii. will there also be an inconsistency if I created 2 separate multiproviders for each model, and create a jump query from the 0fi gl_6 model to 0fi gl_c4 model. If not, why not in this case?
    iii. So, is there any advantage in placing a multiprovider on each of these models separately? i.e. instead of directly reporting off the cubes separately?
    3. I am wondering why in the case of gl_6 (the totals) help.sap recomended to go directly from the datasource to the cube i.e. without DSO in between.
    If without the DSO step is an advantage, what are the advantages?
    And why then do we use DSOs in most model instead? I will appreciate any reasons you may think of..
    Thnx.
    Edited by: AmandaBaah on Jul 28, 2009 11:07 AM
    Edited by: AmandaBaah on Jul 29, 2009 2:25 AM

  • I have purchased a 'adobe font folio 11'. The ci in this font was made. Is there anything wrong with this post copyright if the Web site?

    I have purchased a 'adobe font folio 11'.
    The ci in this font was made.
    Is there anything wrong with this post copyright if the Web site?

    These machines in themselves are usually pretty good, with the occasional aberration. Let's hope you do not have a rogue.
    Looking at the problems there seem to me (as a guess) two problems: incomplete processes and memory. The two may be related. The camera problem I would dismiss as simply that -- batteries run out and the Mac is trying to complete an impossible process: expecting data, data never arrives.
    The Firefox problem may be something external: a badly coded page; something the browser (or Mac) was not equipped to handle (a plug-in for example) and this could put a strain on RAM.
    Maya, I am not familiar with, but it is (if I remember rightly) graphics-oriented and that can be memory intensive).
    Which all comes down to the RAM you bought. Without knowing what it is or where it came from, or your experience in installing it, that in itself could be a problem. You need to make sure that it is properly seated for one thing, that it is the correct type (although the information here suggests that you are on the right track) and that it is OK.
    You might also want to think about posting a crash log here (find these in Console) as someone -- not me -- might be able to pinpoint a cause.

  • What's wrong with this ejb-query?

    Hi people,
    may be i worked too much, may be i've just missed something, but guys, can enyone tell me what the hell is wrong with this GOD DAMNED query?
    <ejb-ql>Select Object(adt) From AddrDataTable AS adt, IN (adt.addresseeQualities) AS aq WHERE adt.season.id = ?1 And aq.aQTemplate.id=?2</ejb-ql>
    That JBoss throws following exception:
    org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'Select Object(adt) From AddrDataTable AS adt, IN (adt.addresseeQualities) AS aq WHERE adt.season.id = ?1 And aq.aQTemplate.id=?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 103.
    Was expecting one of:
    "ABS" ...
    "LENGTH" ...
    "LOCATE" ...
    "SQRT" ...
    "+" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <NUMERIC_VALUED_PARAMETER> ...
    <NUMERIC_VALUED_PATH> ...
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQLQuery.java:50)
    The worst thing is that when i remove WHERE clause JBoss keeps silence like a fish - it works fine!
    So, any ideas about this?
    Thank you

    Are you sure the ?1 and ?2 parameters exist in the method for which the query is addressed.
    In the statement adt.season.id I guess season is a CMR field and then season has a CMP field called id
    and the same for aq.aQTemplate.id, aQTemplate being the CMR field and the is being a CMP field in the CMR.
    and in adt.addresseeQualities is a CMR field?
    Looks like a complex query
    SELECT OBJECT(adt) from BEAN AS adt,
    IN(adt.CMR_FIELD) AS aq
    WHERE
    adt.ANOTHER_CMR.ANOTHER_AMR_CMP_FIELD=?1
    AND
    aq.2_CMR_FIELD.2_CMP_FIELD =?2

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • What's wrong with this sql query?  Help

    hi
    i am having difficulty executing this query
    ResultSet s=st.executeQuery("select * from employee where iden = ?"+id);
    here in my program st is statement obg
    iden is attribute name in table
    id i am getting at run time from user
    please help...it says wrong number of parameters
    thank you

    That's correct, get rid of the Question mark. Questions marks are used in PreparedStatements, but they are also used in pattern matching. I am assuming the iden is the table identity. Therefore, I am assuming it is numeric. If so, you can't use the question mark because pattern matching is only done with strings. If you are treating your statement as a PreparedStatement, then you have done it wrong. (See the API) Here is a code snippet from the API:PreparedStatement pstmt =     
       con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");
    pstmt.setBigDecimal(1, 153833.00)
    pstmt.setInt(2, 110592)It seems you are using a Statement object, so, you need to get rid of that question mark.
    tajenkins

  • Anything Wrong with this query?

    I have been trying to create a report based on this query:
    SELECT call_type.call_type_detail,
    code_city.code_city_detail, area_code.area_code_detail,
    call_reason.call_reason_detail, cform.cform_phone_number_body,
    call_outcome.call_outcome_detail,
    outcome_reason.outcome_reason_detail, cform.cform_date_time ,
    cform.cform_comments
    FROM call_type, code_city, area_code, call_reason, cform,
    call_outcome, outcome_reason
    I have verified all fields to make sure they match and when I
    try to test it CFR crashes...any idea as to why this may be
    happening? Thanks!

    The funny thing is I WAS using inner join already, but didn't
    know it was called that and didn't add it to the post since I have
    quite a few variables as criteria and thought it would make it
    difficult to understand. In the end it was stalling because of an
    error in a table I had not properly specified.
    This is what I had from the start!
    SELECT call_type.call_type_detail,
    code_city.code_city_detail, area_code.area_code_detail,
    call_reason.call_reason_detail, cform.cform_phone_number_body,
    call_outcome.call_outcome_detail,
    outcome_reason.outcome_reason_detail, cform.cform_date_time ,
    cform.cform_comments
    FROM call_type, code_city, area_code, call_reason, cform,
    call_outcome, outcome_reason
    WHERE cform.cform_date_time BETWEEN
    #CreateODBCDateTime(param.CustomFullStartDate)# AND
    #CreateODBCDateTime(param.CustomFullEndDate)# AND
    cform.cform_call_product=#param.GetCustomProduct# AND
    cform.call_service= #param.GetCustomService# AND
    cform.cform_call_reason=#param.GetCustomCallReason# AND
    cform.cform_call_outcome=#param.GetCustomCallOutcome# AND
    cform.cform_call_outcome_reason=#param.GetCustomReason# AND
    call_type.call_type_id=cform.cform_call_type AND
    call_city.call_city_id=cform.cform_call_city AND
    area_code.area_code_id=cform.cform_area_code AND
    call_reason.call_reason_id=cform.cform_call_reason AND
    call_outcome.call_outcome_id=cform.cform_call_outcome AND
    outcome_reason.outcome_reason_id=cform.cform_outcome_reason AND
    cform.cform_date_time

  • Anything obviously wrong with this SQL query?

    Hey guys
    I can insert single data into my SQL DB, but multi line is throwing an error:
    This works:
    "INSERT INTO tester3 (Genre, DiscID) VALUES ('yeah', 'SF001');"
    This doesn't:
    "INSERT INTO tester3 (Genre, DiscID) VALUES ('X', 'none'),('X', 'none'),('X', 'none');"
    Throws the error:
    Error message: Error #3115: SQL Error.
    Details: near ',': syntax error
    I'm guessing there's something simple I'm overlooking?
    Thank you

    Nevermind - you do it like this:
    INSERT INTO "testerTable" (rowID, Column1, Column2)
    SELECT NULL,  "testData1", "moreData1"
    UNION SELECT NULL, "testData2", "moreData2"
    UNION SELECT NULL, "testData3", "moreData3"
    Also, I found a REALLY good article at http://stackoverflow.com/questions/1711631/how-do-i-improve-the-performance-of-sqlite that compares different ways of inserting over 800 000 rows of data, that results in insert speeds anywhere from 85 inserts per second all the way up to 96 700!!!
    It's written for C, and I'm unsure how much of the SQLLite syntax they have in the article will work in AIR, but I'll see how far I get with it.

  • Is anything wrong with this part of my code?

    Hi all,
    I am making a program with lots of methods inside the one class
    whenever I call this method it stuffs up... it may be the way I call it or it may be the code is wrong.... could u please tell me if there is an error in the code or if this section is ok?
        public static int seatSearch(String[][] reservation, String target)
            // cycle through the array
            for (int i = 0; i < reservation.length; i++)
                // if the target is found, return the index
                if (reservation[0] == target)
    System.out.println("found at [" + i + "][0]");
    return i;
    // if it finished the loop and still hasn't returned anything
    // then return -1 to signal the data wasn't found
    System.out.println("the data was not found!");
    return -1;
    oh yeh... it compiles but when I call it it always returns -1 even when its meant to return the index...
    Thanks,
    Mike

    do some defensive coding and check for nulls,
    put some printlnwhat do u mean?
    If you have a NullPointer Exception, then your code has a reference variable that does not point to an object.
    If the exception comes from the code you posted, either the target variable, the reference variable, or one of the contents of the reference array must be null. To determine which it is, put a System.out.println(target+"\t"+reservation; at the start of the method and put a System.out.println(i+"\t"+reservation[0]); as the first line in the for loop. When your run the code, it will display null somewhere - and that's what you have to fix.
    My guess is you have null references in the reservation array and you must decide what to do with those in your code. For exampleif (reservation[0] != null && reservation[i][0].equals(target))

  • What is wrong with this simple query

    Hi,
    I am writting a simple code just to get the maximum no values from a database table
    The query is
    ResultSet = stm.executeQuery("SELECT MAX(column_name) FROM Database_table ");
    it seems to be a simple one but i am getting the message
    column not found
    Please answer soon

    Well, it depends on how your resultset is retrieving the results. If you retrieve by column name, then that's your problem. You need to do something like this:
    ResultSet = stm.executeQuery("SELECT MAX(column_name) AS myColumnName FROM Database_table ");
    String myResult = ResultSet.getString(myColumnName);Using MAX, COUNT, etc, will return your result with a mangled or no actual column name to retrieve from. Optionally, you can solve your problem by:
    ResultSet.getString(1);Michael Bishop

  • Is their anything wrong with this stored procedure?

    CREATE PROCEDURE [dbo].[DeleteAllUserReferences]
    @UserName NVARCHAR(256),
    @Id NVARCHAR(128),
    @Role NVARCHAR(256),
    @RowsAffected int OUTPUT
    AS
    BEGIN TRY
    /*Declare @RowsAffected int;*/
    EXEC aspnet_UsersInRoles_RemoveUsersFromRoles "mainwebsite",@UserName,@Role
    EXEC aspnet_Users_DeleteUser "mainwebsite",@UserName,15,@RowsAffected
    DELETE FROM [AspNetUserRoles] WHERE UserId = @Id
    DELETE FROM [AspNetUsers] WHERE UserName = @UserName
    COMMIT TRANSACTION
    END TRY
    BEGIN CATCH
    ROLLBACK TRANSACTION
    END CATCH
    RETURN 0
    I have a stored procedure above which executes fine when I execute it manually but does not when I execute it via asp.net. Only the first statement executes and the rest does not. Is their anything that might not be proper SQL in this code causing it to stop
    functioning properly?
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

    Since I don't know anything about the contents in that procedure I cannot comment on it. But if an error occurred, you would be taken the CATCH block and the error would be reraised.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Here's the code you requested:
    CREATE PROCEDURE [dbo].aspnet_Users_DeleteUser
    @ApplicationName nvarchar(256),
    @UserName nvarchar(256),
    @TablesToDeleteFrom int,
    @NumTablesDeletedFrom int OUTPUT
    AS
    BEGIN
    DECLARE @UserId uniqueidentifier
    SELECT @UserId = NULL
    SELECT @NumTablesDeletedFrom = 0
    DECLARE @TranStarted bit
    SET @TranStarted = 0
    IF( @@TRANCOUNT = 0 )
    BEGIN
    BEGIN TRANSACTION
    SET @TranStarted = 1
    END
    ELSE
    SET @TranStarted = 0
    DECLARE @ErrorCode int
    DECLARE @RowCount int
    SET @ErrorCode = 0
    SET @RowCount = 0
    SELECT @UserId = u.UserId
    FROM dbo.aspnet_Users u, dbo.aspnet_Applications a
    WHERE u.LoweredUserName = LOWER(@UserName)
    AND u.ApplicationId = a.ApplicationId
    AND LOWER(@ApplicationName) = a.LoweredApplicationName
    IF (@UserId IS NULL)
    BEGIN
    GOTO Cleanup
    END
    -- Delete from Membership table if (@TablesToDeleteFrom & 1) is set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_MembershipUsers') AND (type = 'V'))))
    BEGIN
    DELETE FROM dbo.aspnet_Membership WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_UsersInRoles table if (@TablesToDeleteFrom & 2) is set
    IF ((@TablesToDeleteFrom & 2) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_UsersInRoles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_UsersInRoles WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Profile table if (@TablesToDeleteFrom & 4) is set
    IF ((@TablesToDeleteFrom & 4) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_Profiles') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_Profile WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_PersonalizationPerUser table if (@TablesToDeleteFrom & 8) is set
    IF ((@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT name FROM sysobjects WHERE (name = N'vw_aspnet_WebPartState_User') AND (type = 'V'))) )
    BEGIN
    DELETE FROM dbo.aspnet_PersonalizationPerUser WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    -- Delete from aspnet_Users table if (@TablesToDeleteFrom & 1,2,4 & 8) are all set
    IF ((@TablesToDeleteFrom & 1) <> 0 AND
    (@TablesToDeleteFrom & 2) <> 0 AND
    (@TablesToDeleteFrom & 4) <> 0 AND
    (@TablesToDeleteFrom & 8) <> 0 AND
    (EXISTS (SELECT UserId FROM dbo.aspnet_Users WHERE @UserId = UserId)))
    BEGIN
    DELETE FROM dbo.aspnet_Users WHERE @UserId = UserId
    SELECT @ErrorCode = @@ERROR,
    @RowCount = @@ROWCOUNT
    IF( @ErrorCode <> 0 )
    GOTO Cleanup
    IF (@RowCount <> 0)
    SELECT @NumTablesDeletedFrom = @NumTablesDeletedFrom + 1
    END
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    COMMIT TRANSACTION
    END
    RETURN 0
    Cleanup:
    SET @NumTablesDeletedFrom = 0
    IF( @TranStarted = 1 )
    BEGIN
    SET @TranStarted = 0
    ROLLBACK TRANSACTION
    END
    RETURN @ErrorCode
    END
    Sorry, about the delay. If you think this helps then I will finally be able to finish my stored procedure and move on.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
    suffering - Yoda. Blog - http://www.computerprofessions.co.nr

  • Wat is wrong with this simple query ???

    I am using 10gxe.
    Below is the query which is not working
    Whenever i am executing it a pop up windows is coming up
    and asking me to enter bind variables ..wat shall i do ???
    Here is a prntscrn of the issue .
    http://potupaul.webs.com/at.html
    VARIABLE g_message VARCHAR2(30)
    BEGIN
    :g_message := 'My PL/SQL Block Works';
    END;
    PRINT g_message
    Edited by: user4501184 on May 18, 2010 12:42 AM

    sqlplus "system/sm@test"
    SQL*Plus: Release 10.2.0.2.0 - Production on Tue May 18 12:45:05 2010
    Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> VARIABLE g_message VARCHAR2(30)
    SQL> BEGIN
    2 :g_message := 'My PL/SQL Block Works';
    3 END;
    4 /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_message;
    G_MESSAGE
    My PL/SQL Block Works
    SQL>

  • Anything wrong with this repo?

    following the beginners guide on wiki, doing the rankmirror
    It says my best option is
    mirror.neotuli.net
    second best is
    homes.umflint.edu
    third is
    ftp.archlinux.org
    4th
    mrrors.easynew.com
    I am in USA, Oklahoma
    any suggestions.

    If it's fast for you with rankmirror, generally choose the order that it gives.
    This great website gives status updates on current mirrors.

  • Anybody see anything wrong with this syntax ?

    I tried to compile the following, but tells me there is an else without an if :
    import javax.swing.JOptionPane;
    class Test {
    public static void main (String[] args) {
    String response;
    int togo = 0;
    response = JOptionPane.showInputDialog ("What is your age?");
    if (response == null)
    JOptionPane.showMessageDialog
    (null, "You clicked on the Cancel button");
    else
    if (response.equals (""))
    JOptionPane.showMessageDialog
    (null, "You must make an entry");
    else
    if ((Integer.parseInt(response)) < 65)
    togo = (65 - (Integer.parseInt(response)));
    JOptionPane.showMessageDialog
    (null, "You have " + togo + " years to go until
    retirement");
    else
    JOptionPane.showMessageDialog
    (null, "You are already able to retire");
    System.exit (0);

    import javax.swing.JOptionPane;
    class Test {
    public static void main (String[] args) {
    String response;
    int togo = 0;
    response = JOptionPane.showInputDialog ("What is your age?");
    if (response == null) {   // -- Whenever you have more than one line of commands, you must enclose your statements with braces
    JOptionPane.showMessageDialog
    (null, "You clicked on the Cancel button");
    } else if (response.equals ("")) { // same problem
    JOptionPane.showMessageDialog
    (null, "You must make an entry");
    } else if ((Integer.parseInt(response)) < 65) {// same problem
    togo = (65 - (Integer.parseInt(response)));
    JOptionPane.showMessageDialog
    (null, "You have " + togo + " years to go until
    retirement");
    } else { // same problem
    JOptionPane.showMessageDialog
    (null, "You are already able to retire");
    System.exit (0);
    } // close that last else statement
    when you have more than one statement for your if i.e.
    if ( condition ) {
    statement 1;
    statement 2;
    } else if ( condition2 ) {
    statement 1;
    statement 2;
    } else {
    hope that this helped

  • Please help anything wrong to this file

    Hi!
    I encounter this error when try to import a file. But there is not problem when i use other pc to complier and import the file.
    Compiling C:\test\RationalTest.java
    Command line: "C:\j2sdk1.4.0\bin\javac.exe" -deprecation -g -classpath C:\test "C:\test\RationalTest.java"
    The current directory is: C:\test
    C:\test\RationalTest.java:1: '.' expected
    import Rational;
    ^
    1 error
    Finished

    Compiling C:\test\RationalTest.java
    Command line: "C:\j2sdk1.4.0\bin\javac.exe"
    -deprecation -g -classpath C:\test
    "C:\test\RationalTest.java"
    The current directory is: C:\test
    C:\test\RationalTest.java:1: '.' expected
    import Rational;
    ^
    1 error
    FinishedWhere is Rational located? Is it a single class file or a .jar file?

Maybe you are looking for