Unknown column name: annee

Hi,
I have a error message.
My request is good but in my program java, annee is a unknown column name.
SELECT DISTINCT round(wbdate/10000,0) AS annee FROM EUROF400.FICLIB.IE02 WHERE WBETAT=:etat ORDER BY annee DESC
String l_annee=mod.getIe0211().getBigDecimal("annee").toString();
Thanks in advance

SELECT DISTINCT round(wbdate/10000,0) AS annee FROM
EUROF400.FICLIB.IE02 WHERE WBETAT=:etat ORDER BY annee
DESC
There are some JDBC drivers which will not return the column alias.
String
l_annee=mod.getIe0211().getBigDecimal("annee").toString
);I'd be carefull with that. If getBigDecimal returns null (because wbdate is null) then you'll get a NullPointerException.
mod.getIe0211().getString(1) is probably the safest way to do it.
Thomas

Similar Messages

  • Error in Abap code - Unknown column name

    Hi
    I have this error in my code.
    Unknown column name "SUM(EKBE-MENGE)" field list. field list. field
    My code
    *Select sum(ekbe-menge)
           into MCSTRUCT-ZQuant
          from ekbe*
    How do I resolve this.
    thanks

    Hi,
    Try the following statement:
    Select sum( menge )
    into MCSTRUCT-ZQuant
    from ekbe.
    hope it helps...
    regards,
    Raju

  • Report data binding error unknown column name

    Hi,
    I am having a problem with the new 7.02 update of Report
    Builder. The issue is it's not finding my SQL query.
    I have wrote my query initally in the advance mode, and it
    doesn't seem to reconize it. Is there an issue with this?
    I did manage to fix one of my reports by using the basic mode
    and selecting all my tables and seting my linkage and criteria.
    I have other computers that i have not updated to 7.02 and
    they do not have this issue. Below is the error:
    Error Occurred While Processing Request
    Report data binding error Unknown column name : work_phone.
    Please try the following:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote Address 127.0.0.1
    Referrer
    Date/Time 13-Jul-06 02:33 PM
    Stack Trace (click to expand)
    coldfusion.runtime.report.Report$ReportDataBindingException:
    Report data binding error Unknown column name : work_phone.
    at
    coldfusion.runtime.report.Report.runReport(Report.java:420)
    at
    coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:96)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:106)
    at coldfusion.xml.rpc.CFCServlet.doGet(CFCServlet.java:157)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This report works in 7.01. So all query variables match with
    a variable in the SQL select statement.
    Anyone have any Ideas??
    Thanks,
    Daniel

    Thank you very much for help.
    The "Unknown column name " is a field still used in my
    report, so I can't remove it.
    After I clear the query in the report and reopen the report
    and apply the same query back to it, I get different error message:
    Element TASKNUM is undefined in QUERY.
    The error occurred in : line 1
    -1 : Unable to display error's location in a CFML template.
    I know for sure this "Element TASKNUM is undefined in QUERY."
    is defined in query. each time it complains something different. I
    get really confused.
    Thanks again.
    Yueming

  • Unknown Column Name "XYZ" not detemined untill runtime.Select query.

    Hi,
    I have written a query in ABAP.I am getting following error.Can some one help me resolve this.There is a column "LANDX" in standard table T005 of PI which i need to get values from. The problem is that the column is visible only at runtime and not otherwise.How can i fetch data from this coulmn writing a select query for this.
    Query written is:
    SELECT landx from T005 into table it_t005.
    Error:
    "Unknown column name "XYZ" not determined untill runtime,you cannot specify a field list."

    Hi Deepika u were right. that there is a landx field but it is included in that table.
    so u cant exactly get it.
    now u can get ur country name and iso code just like this.
    tables: t005t  , t005.
    data: BEGIN OF it OCCURS 100,
            landx like t005t-landx,
            intca like t005-intca,
            END OF it.
    SELECT t005t~landx t005~intca   into CORRESPONDING FIELDS OF TABLE it
      from T005t
      INNER JOIN t005 on ( t005t~land1 = t005~land1 ).
    it is fulfilling ur need.
    Edited by: Matt on Feb 3, 2009 7:49 AM - Please don't use txtspk

  • The column name "PERNR" has two meanings. ABAP/4 Open SQL statement.

    Hi All,
    Could anyone advise on what are the error I encountered at below code.
    I get the error in " The column name "PERNR" has two meanings. ABAP/4 Open SQL statement." . This errors happen to all the key fields I have selected in below code (eg: pernr, subty, objps, sprps, begda, endda, seqnr).
    The field zeih also encountered error in "Unknown column name "ZEIH". not determined until runtime, you cannot specify a field list."      
      SELECT  pernr
                   subty
                   objps
                   sprps
                   begda
                   endda
                  seqnr
                  zlsch
                  ZEIH
      SELECT * INTO CORRESPONDING FIELDS
              OF TABLE  i_pa0009
              FROM pa0001 INNER JOIN pa0009
              ON pa0001pernr = pa0009pernr
              WHERE bukrs IN s_code AND
              banks NE space.

    Hi,
    In this query
    SELECT pernr
    subty
    objps
    sprps
    begda
    endda
    seqnr
    zlsch
    ZEIH
    if you have used joins and if both the database pa0001, pa0009 has the above mentioned fields you will get the error message as the control gets confused as to which table of the field you are referring to..., instead use them in this way
    SELECT pa0001~pernr
    for each field mention to which table it belongs and ~ before the field name in the above fashion, this will remove the error
    Regards,
    Siddarth

  • Function short dump - A dynamically specified column name is unknown.

    Hello,
    I've created BRF fuction according to the  Note 1466868 - Dunning by collection strategy with BRFplus. I get short dump during simulation of function with following exception:
    "A dynamically specified column name is unknown. "
    Runtime Errors         SAPSQL_INVALID_FIELDNAME
    Exception              CX_SY_DYNAMIC_OSQL_SEMANTICS
    No.   Ty.          Program                             Include                             Line
          Name
       19 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM012   129
          CL_FDT_ELEMENT=>GET_VALUES_DDIC
       18 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM011   124
          CL_FDT_ELEMENT=>GET_VALUES
       17 METHOD       CL_FDT_WD_RENDER_VALUE_INPUT==CP    CL_FDT_WD_RENDER_VALUE_INPUT==CM00G   139
          CL_FDT_WD_RENDER_VALUE_INPUT=>VALIDATE_VALUES
    In my opinion there is uncorrect query.
    Current version:
    .  SELECT FIKRS AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    instead of:
    .  SELECT FM_AREA AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    My sap version:
    EHP4 FOR SAP ERP 6.0 / NW7.01
      SAP_BASIS     701     0003     SAPKB70103
    Do you know any note or solution  to resolve this problem.
    Best regards,
    Jacek Witczak

    Hi, I came back to working on "Dunning by collection strategy with BRFplus". According to your sugestions, I raised the level of components:
    SAP_BASIS Level 09
    SAP_ABA level 09
    PI_BASIS level 09
    SAP_BW level 09
    But still I have the same short dump.
    Shoudl we raise any other components? Maybe you know note, which resolve this problem?

  • Invalid column name in WLS 6.1 sp4

    We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
    we migrated to sp4 and get a invalid column name exception while updating records.
    For select queries there is no error. The SQL generated by toplink is -
    UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
    , REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
    UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
    It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
    to fix it
    The exception stack trace is -
    2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
    - Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
    STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904
         at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
         at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
         at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
         at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
    sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904 - with nested exception:
    [EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904]
         at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    com.pws.framework.exception.GeneralException: There was an unexpected error. Please
    contact your system administrator.
         at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
         at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
         at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
         at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
         at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    We have changed default thin driver to 920 from 817 in 610sp4. If you are using 817/901 dbserver, please put 817/901 classes12.zip in your
    classpath before weblogic.jar and you will be ok.
    Mitesh
    vivek wrote:
    We have been using WLS 6.1 sp2 with toplink and never had any problems. Recently
    we migrated to sp4 and get a invalid column name exception while updating records.
    For select queries there is no error. The SQL generated by toplink is -
    UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
    , REMK = 'Remark 123', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
    UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
    It looks like some problem with the JDBC driver. The databse is Oracle 8.17. How
    to fix it
    The exception stack trace is -
    2002-11-27 11:56:25,763 ERROR com.pws.ubiquity.pr.business.TransactionTypeFacade
    - Error while commiting transaction (creating TransactionType):LOCAL EXCEPTION
    STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
    at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
    at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    INTERNAL EXCEPTION STACK:
    java.sql.SQLException: ORA-00904: invalid column name
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at weblogic.jdbc.jts.Statement.executeUpdate(Statement.java:503)
    at weblogic.jdbc.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:66)
    at weblogic.jdbc.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStatement.java:57)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(Unknown
    Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown
    Source)
    at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown
    Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.StatementQueryMechanism.insertObject(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown
    Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown
    Source)
    at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(Unknown
    Source)
    at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(Unknown
    Source)
    at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:551)
    at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:88)
    at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:982)
    at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1506)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:215)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    --------------- nested within: ------------------
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion:
    sync=oracle.toplink.jts.wls.WebLogicSynchronizationListener@373d4a
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904 - with nested exception:
    [EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-00904: invalid column name
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-00904: invalid column name
    ERROR CODE: 904]
    at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1490)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:265)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
    at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:247)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:584)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    2002-11-27 11:56:25,793 DEBUG com.pws.framework.common.MessageSourceFactory -
    Get MessageSource for error message.:
    com.pws.framework.exception.GeneralException: There was an unexpected error. Please
    contact your system administrator.
    at com.pws.framework.exception.GeneralException.create(GeneralException.java:111)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade.addTransactionType(TransactionTypeFacade.java:588)
    at com.pws.ubiquity.pr.business.TransactionTypeFacade_ocr0a6_EOImpl.addTransactionType(TransactionTypeFacade_ocr0a6_EOImpl.java:271)
    at com.pws.ubiquity.pr.web.action.AddTransactionTypeAction.doExecute(AddTransactionTypeAction.java:120)
    at com.pws.ubiquity.common.web.action.SecureAction.perform(SecureAction.java:240)
    at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1786)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

  • Using Column Name returned by function in SELECT statement

    Hi
    Output from my function (RETURN data type is VARCHAR2) is column name. I want to use it directly in my SELECT statement. Below is simplified example of this:
    --- Function
    CREATE OR REPLACE FUNCTION simple RETURN varchar2 IS
    BEGIN
    RETURN ‘my_column’;
    END simple;
    --- Select
    SELECT simple FROM my_table;
    This does not work. It seems that output from function is passed in quotation i.e.
    SELECT ‘my_column’ FROM my_table;
    So the output from SELECT is a list of rows populated with values my_table:
    COLUMN     simple
    ROW1     my_column
    ROW2     my_column
    ROW3     my_column
    Can please someone help me with this?

    I'm not sure I got you right.
    In standard SQL everything must be known at compile time. If not dynamic SQL is required, but is a costly operation (usually requires parsing before each execution) so it should better not be used when standard SQL can do it.
    I provided a design time example where a function returns the column name from the given the table name and column id for a varchar2 column data type to make things simple. Then a query string is constructed and executed dynymically to return all column values of the chosen table_name.column_name.
    SELECT simple FROM my_tableAt compile time the simple function return value is unknown (any varchar2 value would do) you already find out you get the (same) return value (i.e column name) for each table row => dynamic SQL needed to get the column values
    The purpose of function would be to rename all columns for provided table.The table name would be provided, right? If yes => dynamic SQL
    What is the function supposed to return the column name (where would the new name come from?), the column alias (which table column would be renamed to the new name?)
    The user could use the new_column name as the column alias name submitting the query.
    Is it possible to do this?Maybe () using a pipelined function (different data types - number,date, ... not cosidered yet) but your simple query;
    <tt>SELECT simple FROM my_table</tt>
    might look like:
    <tt>select my_column_value new_column_name from table(get_column_value(table_name,column_name))</tt>
    Sorry, no Database at hand to provide a specific example.
    Regards
    Etbin

  • LRM-00101 unknown parameter name  'LOC'

    Hi Everyone,
    I have been working at trying to learn the syntax of this expdp and having a difficult time with it.  I follow the instructions and examples to the
    “T” yet I still get errors.  I have a windows 7 Professional laptop I am using with oracle release 11.2.0.1 instance.  I am just working with this simple query from the scott schema and get the following error: 
    LRM-00101 unknown parameter name  'LOC'
    expdp scott/tiger directory=dpump_dir1  dumpfile=scottrows.dmp  query=DEPT:"where LOC='CHICAGO'"
    The suggested solution in the documents going by the code is to correct the mis spelling.  LOC is a column name in the DEPT table of the scott schema.
    I just ran the following query with the same parameter and it returned rows.
    select * from dept where loc = 'CHICAGO';
    Is it me?  I am at a loss with this and it is making me doubt my sanity.  Is there some documentation that I am not reading?  I am already reading the Oracle documents and none of their examples work on my laptop.
    What is it about this syntax that I am overlooking??
    Thanks for your help in advance.
    Al

    What is it about this syntax that I am overlooking??
    You need to enclose the query parameter in quotation marks as explained in the Utilities Doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_export.htm
    The query must be enclosed in single or double quotation marks. Double quotation marks are recommended, because strings within the clause must be enclosed in single quotation marks. Oracle recommends that you place QUERY specifications in a parameter file to avoid having to use operating system-specific escape characters on the command line. See Use of Quotation Marks On the Data Pump Command Line.
    QUERY='sales:"WHERE EXISTS (SELECT cust_id FROM customers c
      WHERE cust_credit_limit > 10000 AND ku$.cust_id = c.cust_id)"'

  • Unknown column in the excel sheet created using Export to Excel

    Hi,
    I created an excelsheet for the table data using the below link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/exporting%20context%20data%20into%20excel%20using%20the%20web%20dynpro%
    20Binary%20Cache.pdf
    but problem here is when i open the excel sheet it is having some unknown columns apart from the expected like amount/#agg next to the actual column amount and it is happening only for the cloumns which have some numbers.
    I dont know where these columns are coming from.
    Send me the solution and points will be rewarded for the helpful answers.
    I want to put some name to the excel file instead of using system created file name.for this requirement where do i need to change the code

    Hi,
    You can export to excel even not relating with any libraries
    Follow this way..
    Take one singleDimensional array, arrColNames[], and one Two dimensional array, arrValues[][].
    File f=new File("Sample.xls);
    FileOutputStream fos=new FileOutputStream(f);
    for(int i=0;i<arrColNames.length;i++)
    fos.write(arrLabels<i>.getBytes());
    fos.write("\t".getBytes());
    fos.write("\n".getBytes());
    for(int j=0;j<noOfRows;j++)
    String arr[]=arrValues[j];
    for(int a=0;a<arr.length;a++)
    if(arr[a]!=null)
         fos.write(arr[a].getBytes());
        fos.write("\t".getBytes());
    fos.write("\n".getBytes());
    fos.flush();
    fos.close();
    The exported excelFile will be stored in your server. If you want to open it using FileDownLoad UI Element,
    Create value attributes resource of type Resource, behaviour of type FileDownLoadBehaviour, reso of type String, fileName of type String , Then then append this code
    FileInputStream fis=new FileInputStream(f);
    FileChannel fc=fis.getChannel();
    byte data[]=new byte[(int)fc.size()];
    ByteBuffer bb=ByteBuffer.wrap(data);
    fc.read(bb);
    fis.close();
    IWDCachedWebResource objCachedWebresource=null;
    if(data!=null)
    objCachedWebresource=WDWebResource.getWebResource
    (data,WDWebResourceType.XLS);
    objCachedWebresource.setResourceName(f.getName());
    wdContext.currentContextElement().setFileName(f.getName());
    wdContext.currentContextElement().setResource(objCachedWebresource);
    wdContext.currentContextElement().setReso(objCachedWebresource.getAbsoluteURL());
    wdContext.currentContextElement().setBehaviour(WDFileDownloadBehaviour.ALLOW_SAVE);
    Regards
    LN

  • Row Insert Failed - Column name or number of supplied values does not match

    Hi ,
    I am trying add a new field to an existing table in MSSQL and access it in portlets,
    I added the new field in the table, and making necessary updations to the accessing java code seems to look fine. but when i insert the new rwo, fails with exception listed below.
    My code tidbits is as follows.
                   System.out.println("Column Location of outsidePhysician"+ aResultSet.findColumn("outsidePhysician")); // works and returns 24
                   if (anIntake.getOutsidePhysician() != null && !(anIntake.getOutsidePhysician().equals("")))
                        System.out.println("Now Alternate Physician will be added to resultset");
                        aResultSet.updateString(24, anIntake.getOutsidePhysician());
                        aResultSet.updateString("outsidePhysician",anIntake.getOutsidePhysician());
                        System.out.println("Now Alternate Physician already added to resultset"); // also printed
                   }else{
                        aResultSet.updateString(24, "new Physician");
                        aResultSet.updateString("outsidePhysician","new Physician");
                   //NOT NULL
                   aResultSet.insertRow(); // fails here
                   System.out.println("Inserted");
    The table has the right field name too, which is proved when i retrieve the fieldno, based on field name. I tried to delete the field and removing these changes work ok..
    Any ideas would be of help
    Thanks in Advance
    Usha
    [Microsoft][SQLServer 2000 Driver for JDBC]Row insert failed. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.executeStatement(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.insertRow(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.insertRow(Unknown Source) at com.microsoft.jdbcx.base.BaseResultSetWrapper.insertRow(Unknown Source) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.insertRow(WSJdbcResultSet.java:2181) ... 14 more Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Insert Error: Column name or number of supplied values does not match table definition. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExce

    I haven't ever used that method of inserting rows, but from the example in the API documentation it looks to me like you have to callaResultSet.moveToInsertRow();before you callaResultSet.insertRow();Or are you just "inserting" the physician's name into existing rows of the database? If that's what you are doing then you need to callaResultSet.updateRow();Message was edited by:
    DrClap

  • MS Access DB with Spaces in Column Name

    Good Afternoon-
    I'm having some serious headaches with a table that I need to extract information from. The powers that be wrote it with the following column names "Contract Number" , "Customer Number", "Description".
    Note the spaces in the columns.
    Sample code from here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2
    I'm using sample code for connecting to the database and I can access everything using the select statements, except if the column contains a space. I get the following errors:
    s.execute("select [Customer Number], Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    s.execute("select \"Customer Number\", Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    s.execute("select Customer*Number, Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
    s.execute("select 'Customer Number' , Name from Customer");
    Data from column_name: Customer Number , Unknown
    This works, but would require parsing-
    s.execute("select * from Customer");
    Data from column_name: 5 , Unknown
    Suggestions would be truly appreciated.
    Jason

    "select [Customer Number] , Name from Customer " ;
    returned the correct responses.Double quoted identifiers, which is part of ANSI SQL should have solved it....
    "select \"Customer Number\" , Name from Customer " ;
    As mentioned above it has certainly been my experience that DBAs (those with that title) all insist that quoted identifiers should never be used. Thus refactoring the database identifiers is actually the correct solution.

  • [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'Sweepstakes'.

    Okay, I'm by no means a cold fusion expert. But I have been teaching  myself over the last year since our website was built off of Cold  Fusion. So I need help because I am trying to build a site where people  can enter in their e-mail address, and name (first and last) for a  sweepstakes that we have on our catalog.
    I have create a table called "Sweepstakes" so on my MS SQL 2005 Web Box  there is a table under the database called "dbo.sweepstakes". I have  replicated basically everything that a original database that was  already created to capture user's email address for catalog request and  what have you. The original database to capture user's request catalogs  from us is called "dbo.InfoRequest" (just a FYI) and this was the  database I basically replicated in a way.
    So after saying all this, I continue to receive this error message and I  can not figure out why. So here is the error message that I am getting.
    This is the error when trying to load the database from the "webview"  basically. We have an Admin Console to the website and in their, there  is a section to list the contents of a specific database. So if you  requested a catalog, you put in your name, email address, etc on to the  website and when you hit submit on the website it insert it into the  database called "dbo.InfoRequest". So when the Spring comes and I want  to get a list of people that have request a catalog, I go to our  website's admin console and inside there, there is a "List Catalog  Request". When you click on it, it loads a file called  "ListCatalogRequest.cfm" and it displays the "dbo.InfoRequest" database  on the screen in a table format basically. So I am trying to replicate  that for this sweepstakes we are having on our website / catalog but  without using the "dbo.InfoRequest" database. Since we are doing a  drawing, I'd rather it be in it's own database for viewing a drawing. So  I have copied the "ListCatalogRequest.cfm" file and renamed it to  "ListSweepstakesEntrys.cfm" and changed a couple of things in the file  to point to the "dbo.Sweepstakes" that I created this morning and here  are the results when you bring up the "ListSweepstakesEntrys.cfm" file.
    If you need the results and / or code from either  "ListSweepstakesEntrys.cfm" or "IISAdminSecurity.cfm" please let me  know.
    THANK YOU FOR ALL YOUR HELP IN ADVANCE!
    --- ListSweepstakesEntrys.cfm ---
    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name  'Sweepstakes'.
    The error occurred in  E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line 298
    Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm:  line 2
    Called from E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity.CFM: line  298
    Called from E:\data\webs\m_k_tweb2007\admin\ListSweepstakesEntrys.cfm:  line 2
    296 :       WHERE      
    297 :          Username     = '#Client.Username#'    
    298 :          AND Password = '#Client.Password#'
    299 :          AND Active   = 'Y'
    300 :            AND UserType = 'A'
    SQL         SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity,  IDNumber FROM AdminUsers WHERE Username = 'username' AND Password =  'password' AND Active = 'Y' AND UserType = 'A'
    DATASOURCE        M_k_tWeb2007
    VENDORERRORCODE        207
    SQLSTATE        42S22
    Resources:
    * Check the ColdFusion documentation to verify that you are using  the correct syntax.
    * Search the Knowledge Base to find a solution to your problem.
    Browser        Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2)  Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
    Remote Address        24.XX.XX.XX
    Referrer        http://m_k_t.com/admin/admin.cfm
    Date/Time        24-Feb-10 07:32 AM
    Stack Trace
    at  cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298)  at  cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)  at  cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298)  at  cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
    java.sql.SQLException: [Macromedia][SQLServer JDBC  Driver][SQLServer]Invalid column name 'Sweepstakes'.
    at macromedia.jdbc.base.BaseExceptions.createException(Unknown Source)
    at macromedia.jdbc.base.BaseExceptions.getException(Unknown Source)
    at macromedia.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown  Source)
    at macromedia.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown  Source)
    at macromedia.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown  Source)
    at  macromedia.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown  Source)
    at macromedia.jdbc.base.BaseStatement.commonTransitionToState(Unknown  Source)
    at macromedia.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
    at macromedia.jdbc.base.BaseStatement.commonExecute(Unknown Source)
    at macromedia.jdbc.base.BaseStatement.executeInternal(Unknown Source)
    at macromedia.jdbc.base.BaseStatement.execute(Unknown Source)
    at  coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:212)
    at coldfusion.sql.Executive.executeQuery(Executive.java:753)
    at coldfusion.sql.Executive.executeQuery(Executive.java:675)
    at coldfusion.sql.Executive.executeQuery(Executive.java:636)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
    at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
    at  cfiiAdminSecurity2eCFM1992009626.runPage(E:\data\webs\m_k_tweb2007\admin\iiAdminSecurity. CFM:298)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at  coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:63)
    at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:255)
    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:1925)
    at  cfListSweepstakesEntrys2ecfm1853454474.runPage(E:\data\webs\m_k_tweb2007\admin\ListSweeps takesEntrys.cfm:2)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at  coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at  coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at  coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at  coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
    at coldfusion.CfmServlet.service(CfmServlet.java:107)
    at  coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at  jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at  jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at  jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at  jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
    at  jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
    at  jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    OK, this is more a SQL question than a CF question, but not to worry.
    You say this:
    I have create a table called "Sweepstakes"
    My emphasis.
    But your query is this:
    SELECT [Sweepstakes] AS TableAccessLevel, MinimumSecurity,  IDNumber FROM AdminUsers WHERE Username = 'username' AND Password =  'password' AND Active = 'Y' AND UserType = 'A'
    The question I pose to you is: does a SELECT statement in SQL take the name of a table?
    Hint: no.
    Best you revise your SQL docs, I think.
    Adam
    PS: it's "ColdFusion", not "Cold Fusion".  Not that it really matters :-)

  • Unknown parameter name 'ENCRYPTION'

    Hi All,
    I've made a dmp file using expdp for a table containing encrypted coulums.
    But when I tried to use ENCRYPTION parameter to enable encryption of data in dump file sets the command pormpt gives this error:
    unknown parameter name 'ENCRYPTION'
    My DB Version: 10.2.1.0.1

    Dev. Musbah wrote:
    It stills giving the same error: unknown parameter name 'ENCRYPTION'
    Does this parameter can't be used in DB 10g Release 2?Please see the docs or the help with the command. There is no such parameter in data pump.
    C:\Documents and Settings\admin>expdp help=y
    Export: Release 10.2.0.1.0 - Production on Tuesday, 01 December, 2009 14:02:13
    Copyright (c) 2003, 2005, Oracle.  All rights reserved.
    The Data Pump export utility provides a mechanism for transferring data objects
    between Oracle databases. The utility is invoked with the following command:
       Example: expdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp
    You can control how Export runs by entering the 'expdp' command followed
    by various parameters. To specify parameters, you use keywords:
       Format:  expdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
       Example: expdp scott/tiger DUMPFILE=scott.dmp DIRECTORY=dmpdir SCHEMAS=scott
                   or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
    USERID must be the first parameter on the command line.
    Keyword               Description (Default)
    ATTACH                Attach to existing job, e.g. ATTACH [=job name].
    COMPRESSION           Reduce size of dumpfile contents where valid
                          keyword values are: (METADATA_ONLY) and NONE.
    CONTENT               Specifies data to unload where the valid keywords are:
                          (ALL), DATA_ONLY, and METADATA_ONLY.
    DIRECTORY             Directory object to be used for dumpfiles and logfiles.
    DUMPFILE              List of destination dump files (expdat.dmp),
                          e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.
    ENCRYPTION_PASSWORD   Password key for creating encrypted column data.
    ESTIMATE              Calculate job estimates where the valid keywords are:
                          (BLOCKS) and STATISTICS.
    ESTIMATE_ONLY         Calculate job estimates without performing the export.
    EXCLUDE               Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.
    FILESIZE              Specify the size of each dumpfile in units of bytes.
    FLASHBACK_SCN         SCN used to set session snapshot back to.
    FLASHBACK_TIME        Time used to get the SCN closest to the specified time.
    FULL                  Export entire database (N).
    HELP                  Display Help messages (N).
    INCLUDE               Include specific object types, e.g. INCLUDE=TABLE_DATA.
    JOB_NAME              Name of export job to create.
    LOGFILE               Log file name (export.log).
    NETWORK_LINK          Name of remote database link to the source system.
    NOLOGFILE             Do not write logfile (N).
    PARALLEL              Change the number of active workers for current job.
    PARFILE               Specify parameter file.
    QUERY                 Predicate clause used to export a subset of a table.
    SAMPLE                Percentage of data to be exported;
    SCHEMAS               List of schemas to export (login schema).
    STATUS                Frequency (secs) job status is to be monitored where
                          the default (0) will show new status when available.
    TABLES                Identifies a list of tables to export - one schema only.
    TABLESPACES           Identifies a list of tablespaces to export.
    TRANSPORT_FULL_CHECK  Verify storage segments of all tables (N).
    TRANSPORT_TABLESPACES List of tablespaces from which metadata will be unloaded.
    VERSION               Version of objects to export where valid keywords are:
                          (COMPATIBLE), LATEST, or any valid database version.
    The following commands are valid while in interactive mode.
    Note: abbreviations are allowed
    Command               Description
    ADD_FILE              Add dumpfile to dumpfile set.
    CONTINUE_CLIENT       Return to logging mode. Job will be re-started if idle.
    EXIT_CLIENT           Quit client session and leave job running.
    FILESIZE              Default filesize (bytes) for subsequent ADD_FILE commands
    HELP                  Summarize interactive commands.
    KILL_JOB              Detach and delete job.
    PARALLEL              Change the number of active workers for current job.
                          PARALLEL=<number of workers>.
    START_JOB             Start/resume current job.
    STATUS                Frequency (secs) job status is to be monitored where
                          the default (0) will show new status when available.
                          STATUS[=interval]
    STOP_JOB              Orderly shutdown of job execution and exits the client.
                          STOP_JOB=IMMEDIATE performs an immediate shutdown of the
                          Data Pump job.And AFAIK= As Far As I Know
    http://www.google.co.in/search?rlz=1C1GGLS_en-ININ355IN355&sourceid=chrome&ie=UTF-8&q=afaik
    HTH
    Aman....

  • Unknown table name

    Hello.
    After opening the SQL studio I get the following error.
    Error -
    Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
    Base table not found;-4004 POS(21) Unknown table name:SYS_MYAUTOSUPPOSE.
    SELECT SUPPOSE FROM SYSDBA.SYS_MYAUTOSUPPOSE WHERE TYPE = 0
    I've checked - such table does not exist.
    Should I create it manually?
    If so, what are its parameters (columns)?
    Thank Yyou, LUCAS.

    Hello,
    the table SYS_MYAUTOSUPPOSE is a SQL Studio system table which was used in a previous version of SQL Studio (7.5). In new database releases the table does not exist. Please install the newest SQL Studio. The newest version of SQL Studio does not need the table SYS_MYAUTOSUPPOSE.
    Regards
       Wolfgang

Maybe you are looking for