Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1010241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:03:06+00:00 2026-05-16T09:03:06+00:00

Using: select name, id from TEST where id :2 AND name :1 order by

  • 0

Using:

  select name, id 
    from "TEST" 
   where id :2 
     AND name :1 
order by id desc

I am getting ORA: 00904 "TEST"."NAME": invalid identifier error but the wierd part is that I have checked my test table and it does not have NAME field but it has name field, I have also checked all the references which is made from that table and all other constraints but still it gives me same error. I do not know why, is there a way where I can check all the columns of the database for NAME column name or any other debuggind approach recommended would be highly welcomed.

DESC TEST;
Name Null Type


id NOT NULL NUMBER(11)
name VARCHAR2(29)

2 rows selected

EDIT

DESC TEST
Name                           Null     Type                                                                                                                                                                                          
------------------------------ -------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
ID                             NOT NULL NUMBER(11)                                                                                                                                                                                    
NAME                                    VARCHAR2(29)                                                                                                                                                                                  

2 rows selected

Java Code

 public String searchExecute(HttpServletRequest req, javax.servlet.ServletContext ctx, String nextPage){
      // ESCA-JAVA0266:
      System.out.println("This is Awesome");
      // ESCA-JAVA0266:
      System.out.println("id:"+req.getParameter("s_1985"));
      // ESCA-JAVA0266:
      System.out.println("name:"+req.getParameter("s_1984"));

      boolean bDisplayAll = StringUtils.stringToBoolean(req.getParameter("display_all"));
        if(bDisplayAll)
            // ESCA-JAVA0034:
            req.setAttribute("c_display_all", "Y");
            req.setAttribute("c_search_submitted", "Y");
        return nextPage;
      }

JSP Code

<%@ page import="att.leadx.dbutils.AppUtils" %>
<%@ page import="java.util.*" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1">
</head>
<link rel=stylesheet type=text/css href="leadx.css">
<body bgcolor="#FFFFFF"><BR>

<form NAME="forma" ACTION="dispatcher" METHOD="post">
    <INPUT TYPE="hidden" name="action" value="">
    <input type=hidden name="c_master" value="TEST_SEARCH">
    <%
        request.setAttribute("c_form", "TEST_SEARCH");
        request.setAttribute("c_top_title","PROFILE > TEST_SEARCH");
        request.setAttribute("c_top_link_image","images/setup_sm.gif");
        request.setAttribute("c_top_link_action","user.search.setup");
        request.setAttribute("c_top_link_app_func","search_setup");
        request.setAttribute("c_top_link_alt_display","Setup search criteria");
    %>
    <jsp:include page="j_custom_search.jsp" flush="true" />
        <table width="94%" border="0" cellspacing="1" cellpadding="3" align=center>
            <tr>
                <td colspan=4 align=center>
                <INPUT TYPE="submit" value="Search" class=prismsbutton onclick="document.forma.action.value ='cep.project.search.execute'">
                </td>
                <td colspan=4 align=center>
                <INPUT TYPE="button" value="Cancel" class=prismsbutton onclick="window.history.back()">
                </td>
            </tr>
        </table>
</form>
<form NAME="formd" ACTION="dispatcher" METHOD="post">
    <input type="hidden" name="c_jsp" value="j_test_dynamic_search.jsp">
    <%
        request.setAttribute("c_master", "TEST_SEARCH");
        request.setAttribute("c_html_form","formd");
        request.setAttribute("c_list_id","1984");
        request.setAttribute("c_search_form","TEST_SEARCH");
        Object args[] = att.utils.DataStore.arg(att.leadx.dbutils.AppUtils.getLoggedInUser(request), att.utils.DataStore.TYPE_NUMERIC);
        request.setAttribute("c_args", args);
        if (att.utils.StringUtils.stringToBoolean((String)request.getAttribute("c_search_submitted"))){
            %>
                <jsp:include page="j_master_detail_dlist.jsp" flush="true" />
            <%
        }
    %>
</form>

    <%!
        private void o(String s){
            if (att.leadx.dbutils.AppUtils.inDebug())
            System.out.println("[J_USER_SEARCH.JSP] " + s);
        }
    %>

SQL Statement

select name, id from TEST where name = :1 AND id = :2 order by id desc

Error Message

Aug 16, 2010 5:22:21 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: ORA-00936: missing expression

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    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:1451)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:651)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2110)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2324)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:627)
    at att.utils.DataStore.retrieve(DataStore.java:724)
    at org.apache.jsp.j_005fmaster_005fdetail_005fdlist_jsp._jspService(j_005fmaster_005fdetail_005fdlist_jsp.java:566)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:565)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:493)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
    at org.apache.jsp.j_005ftest_005fdynamic_005fsearch_jsp._jspService(j_005ftest_005fdynamic_005fsearch_jsp.java:102)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
    at att.leadx.nav.Dispatcher.service(Dispatcher.java:113)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Unknown Source)

Thanks

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T09:03:07+00:00Added an answer on May 16, 2026 at 9:03 am
    SELECT *
    FROM   ALL_TAB_COLS
    WHERE  UPPER(COLUMN_NAME) = 'NAME';
    

    will show you all columns called NAME

    EDIT:

    Based on your comment, aren’t you missing the operators in your WHERE clause? ie =

    select name, id
    from   "TEST"
    where  id :2      -- Surely you mean: id = :2
    AND name :1       -- Surely you mean: name = :2
    order by id desc
    

    EDIT 2:

    Based on the SQL*Plus output, it looks like you’ve created the table with lower-case column names. Whilst this is possible and valid it’s usually just hard work. I’d recreate the columns with upper case names. (as Alex said)

    EDIT 3:

    I think…

    SELECT "id", "name"
    FROM   TEST
    WHERE  "id" = :1
    AND    "name" = :2
    ORDER BY "id" desc;
    

    should work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using this SQL query: Select * from table_name what happens if the name
Using VB6 and Access 2003 Query Select Temp.* into NewTable from Temp Table Name
Say that I have some SELECT statement: SELECT id, name FROM people ORDER BY
I using sql in php, but, result not show: test(id, name, type, category_id); and
i am using a executing a query select lastlevel as VERSION,name as DESCRIPTION, TO_DATE(lastdate,
Just a quick question about using select() . I'm using select() to read from
HI, Using Microsoft SQL Server 2005: I have a table test: id, link_id, name
Im using JQuery to check the file size and name from an html file
I am writing a simple server using select to monitor multiple sickets. Here's my
There is a drop down using select <%= select(array, folder, @rows.keys, {}, :onchange =>?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.