Prepared statments error
i have this error for my preparedstatments
exception in dbMember.createPreparedStatements() : String index out of range : 0
what does it means?
i am trying to call my selectMemMaxID function to retrieve the max id from my member table
this is my selectMemMaxID method
public void selectMemMaxId() throws Exception
try{
ResultSet rs = selectMaxIdPstmtMem.executeQuery();
setMemMaxId(rs.getInt(1));
catch (SQLException e)
System.out.println("SQLException thrown" + e.getMessage());
and this is my createPreparedStatments() method
public void createPreparedStatements()
try
//For select Max Id in memberparticular table
selectMaxIdStrMem = "select max(memparticular_memid) as MaxId from memberparticular";
selectMaxIdPstmtMem = dbConn.createPreparedStatement(selectMaxIdStrMem);
catch (Exception e)
System.out.println("Exception in dbMember.createPreparedStatements() : " + e.getMessage() );
i did try doing that
public void selectMemMaxId() throws Exception
try{
ResultSet rs = selectMaxIdPstmtMem.executeQuery();
while (rs.next())
setMemMaxId(rs.getInt(1));
catch (SQLException e)
System.out.println("SQLException thrown" + e.getMessage());
but it still return me a java.lang.NullPointerException error and
the error i stated above
Similar Messages
-
JSP MySql prepared statments :(
Hi all - absolute newbie here! - I want to use a prepared statment to search a database based on date - I can get the dates into the database fine but no can get out!
this is the error I get with most the code below
org.apache.jasper.JasperException: Syntax error or access violation, message from server: "You have an error in your SQL syntax near '?' at line 1"
<%@ page import="java.sql.*, java.util.*, java.lang.*" %>
<%
String fromDate=request.getParameter("fromDate");
String toDate=request.getParameter("toDate");
String myYear=(fromDate.substring(6,10));
String myMonth=(fromDate.substring(3,5));
String myDay=(fromDate.substring(0,2));
String myDate=(myYear myMonth myDay);
int myNewDate=Integer.parseInt(myDate);
Connection con = null;
try
String DBUrl="jdbc:mysql://database";
String user="user";
String password="pass";
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection(DBUrl,user,password);
String sql= "select * from caryard where enquiryDate=?";
PreparedStatement st = con.prepareStatement(sql);
st.setInt(1,myNewDate);
st.executeQuery(sql);
any help would be much appreciated
Vix with almost no hair leftFirst thing I see is that you are creating an int for the DATE you are trying to query. I'm not too familiar with MySql, but I'm sure that if you create a field in the database to hold dates then you would have to create a Date object, or Calendar object and then use that to query to database. Plus, the date cannot be read as 20021105 from the database.
I'd look into that first, and make sure the about the datatype you are trying to access in MySql and then also make sure that you have to create Calendar (new GregorianCalendar(year, month, date)) in order to access that db field.
Good luck -
Prepared Statment or Hibernate
I will query One Column in a Table..
Is there any difference between Prepared Statment and Hibernate when it comes to performance?923269 wrote:
Can I use H-SQL of Hibernate?HSQL is the query language that Hibernate defines to allow you to ask questions about your model (entity classes) in stead of having to write SQL which is oriented towards databases. Hibernate is responsible for translating the HSQL query to an actual SQL query and translate the results back to an object model structure.
So yes you can use HSQL, IF you use Hibernate. -
Prepare TP error please help!!! 4.6 C to ECC 6.0
hello when running prepare i get the error below.
i have tried replacing the DB libraries but no go.
Thanks in advance
Joe Villar
[email protected]
ERROR: No connect due to DbSl Load Lib Failure
ERROR: The values set for DIR_LIBRARY ('/usr/sap/put/exe') or dbms_type ('ora') are invalid.
ERROR: Connect to DV1 failed (20070315152112).
TRACE-INFO: 1: [dev trc ,00000] Thu Mar 15 15:21:12 2007 16543 0.016543
TRACE-INFO: 2: [dlux.c ,00000] *** ERROR => DlLoadLib: dlopen()= I/O error -> DLENOACCESS (5,I/O error)
TRACE-INFO: 3: 10 0.016553
command being ran by prepare
/usr/sap/put/exe/tp pf=/usr/sap/put/bin/DEFAULT.TPP execdbscript DV1 -x SQLDBSCRIPT.TQLran R3trans -d from usr/sap/put/exe and got the following errors
4 ETW000 /usr/sap/put/exe/R3trans version 6.14 (release 700 - 26.02.07 - 15:37:00).
4 ETW000 ===============================================
4 ETW000
4 ETW000 date&time : 19.03.2007 - 10:48:21
4 ETW000 control file: <no ctrlfile>
4 ETW000 R3trans was called as follows: /usr/sap/put/exe/R3trans -d
4 ETW000 trace at level 2 opened for a given file pointer
4 ETW000 [dev trc ,00000] Mon Mar 19 10:48:21 2007 63 0.000063
4 ETW000 [dev trc ,00000] db_con_init called 11 0.000074
4 ETW000 [dev trc ,00000] create_con (con_name=R/3) 40 0.000114
4 ETW000 [dev trc ,00000] Loading DB library '/usr/sap/put/exe/dboraslib.o' ...
4 ETW000 43 0.000157
4 ETW000 [dlux.c ,00000] *** ERROR => DlLoadLib: dlopen()= I/O error -> DLENOACCESS (5,I/O error)
4 ETW000 470 0.000627
4 ETW000 [dbcon.c ,00000] *** ERROR => Couldn't load library '/usr/sap/put/exe/dboraslib.o'
4 ETW000 19 0.000646
2EETW169 no connect possible: "maybe someone set invalid values for DIR_LIBRARY ('/usr/sap/put/exe') or dbms_type ('ORA')" -
HI ,
i am upgrading the JAVA Engine 6.20 to 700
i am having the following error .
PREPARE/INIT/DETERMINE_PROFILES
Error while retrieving profile using filter SCSInstanceFilter/sid:SRD/host:null.
Both ABAP and JAVA Sytem are present on smame host .
is there any difference between file structure of JAVA 620 and 640> higher
bcoz i am not able to see SCS<xx> directory structure on this machine .
i have no idea about java system
please hlep me to analyse the things
regards
sachinHI
yes first i have to upgrade my SDM 620 version into SDM 6.40 SP13 level . But my major conser is that .
i believe my client has installed JAVA system as Dialog instance instead of Central instance . ( on ABAP system)
Because i am notable to see Dir SCS<xx> and 2 java Profiles in the Profiles directory .
so this could be the possible reason of my above error .if yes than can we upgrade JAVA Dialog instance without JAVA Centeral instance . ( which i believe possible NOT) .
if yes the what will be the procedure .
also if we cant then can we uninstalle the j2ee 620 engine and install new java system on this machine .
Platfom is HP Unix
Regrads
sachin -
Ingres prepared statement error
Hi there,
I 'm encountering a very strange problem with a prepared statement and ingres.
String strSQL = "select first 50 date_part('year', dtrans_date) as year, ccalled_place as place, " +
"count(*) as calls, " +
"sum(nduration/60.0) as duration " +
"from phone " +
"where date_part('year', dtrans_date) = ? and cDest_type='C' " +
"group by date_part('year', dtrans_date), ccalled_place " +
"order by date_part('year', dtrans_date), calls desc";
PreparedStatement ps = conn.prepareStatement(strSQL);
ps.setInt(1, 2000);
rs = ps.executeQuery();It throws the exception:
ca.gcf.util.SqlEx: An internal error prevents further processing of this query.
Associated error messages which provide more detailed information about the problem can be found in the error log, II_CONFIG:errlog.log
at ca.gcf.jdbc.DrvObj.readError(DrvObj.java:773)
at ca.gcf.jdbc.DrvObj.readResults(DrvObj.java:629)
at ca.gcf.jdbc.DrvPrep.<init>(DrvPrep.java:137)
at ca.gcf.jdbc.DrvConn.getPrepStmt(DrvConn.java:786)
at ca.gcf.jdbc.JdbcPrep.<init>(JdbcPrep.java:364)
at ca.gcf.jdbc.JdbcConn.createPrep(JdbcConn.java:1550)
at ca.gcf.jdbc.JdbcConn.prepareStatement(JdbcConn.java:1380)
at TestIngresDB.query(TestIngresDB.java:37)
at TestIngresDB.<init>(TestIngresDB.java:9)
at TestIngresDB.main(TestIngresDB.java:55)This is exactly at the line:
ps = conn.prepareStatement(strSQL);Checking Ingres' error log:
FREEFALL: 32867 , 12f678e0]: Thu Dec 2 07:01:57 2004 E_SC0207_UNEXPECTED_ERROR Facility returned an undocumented error.
FREEFALL: 32867 , 12f678e0]: ULE_FORMAT: Couldn't look up message 0 (reason: ER error 10902)
E_CL0902_ER_NOT_FOUND No text found for message identifier
FREEFALL: 32867 , 12f678e0]: Thu Dec 2 07:01:57 2004 E_SC0215_PSF_ERROR Error reHowever, other prepared statements like this work fine, e.g.:
String sqlStr = "SELECT * FROM Stock WHERE Item_Number = ?";
PreparedStatement pstmt = con.prepareStatement(query);
pstmt.setInt(1, 2);
ResultSet rs = pstmt.executeQuery();Sorry if this posting is not appropriate here, but I really don't know if this has something to do with JDBC or Ingres driver itself. Note that the query runs perfectly ok when run from Ingres VisualDBA.
Thanks,
John.Your prepared statement looks like
select first 50 date_part('year', dtrans_date) as year, ccalled_place as place, count(*) as calls, sum(nduration/60.0) as duration from phone where date_part('year', dtrans_date) = ? and cDest_type='C' group by date_part('year', dtrans_date), ccalled_place order by date_part('year', dtrans_date), calls desc
I am not sure what this "first 50" is for?
***Annie*** -
Prepared Statement error, someone plz help
strQuery = qryProvide.supplyNotReceivedQuery();
logObject.log("CompDataProvider","supplyNotReceivedRecords",strQuery, XMLMON_Constants.LOG_DEBUG);
stmtRestSchema = con.prepareStatement(strQuery);
stmtRestSchema.setString(1,loadingPoint.trim());
stmtRestSchema.setString(2,schemaName.trim());
stmtRestSchema.setInt(3, process);
stmtRestSchema.setString(4,strFromDt.trim());
rsRestSchema = stmtRestSchema.executeQuery();
if(rsRestSchema.next()){
String proid = rsRestSchema.getString(XMLMON_Constants.MON_LOGS_PROCESS_ID);
int refid = rsRestSchema.getInt(XMLMON_Constants.MON_LOGS_REFID);
} else {
String strQry = qryProvide.supplyNotRecQuery();
logObject.log("CompDataProvider","supplyNotReceivedRecords",strQry, XMLMON_Constants.LOG_DEBUG);
stmtData = con.prepareStatement(strQry.toString());
stmtData.clearParameters();
stmtData.setString(1, loadingPoint.trim());
stmtData.setString(2, schemaName.trim());
stmtData.setInt(3, process);
stmtData.setString(4,strFromDt.trim());
/***************** Its Reaching here/
rsData = stmtData.executeQuery(strQuery);
/***************** Its failing here throwing exception not all variables bound/
if(!( rsData.next() ) ){
// do something here
} else{
System.out.println("do nothing");
rsData.close();
stmtData.close();
rsRestSchema.close();
stmtRestSchema.close();
Can anyone help me in solving the error. i have found the error where and i m not able to find why. please i need help.Could you print out the query, e.g. strQry, I
think the problem lies in the Query string. -
hello friends,
iam using the following code when i tryo to compile it gives the error as follow
<code>
import java.sql.*;
import java.util.*;
class DbDemoPrepared
public static void main (String args[]) throws SQLException
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc.mysql://localhost:3306";
java.util.Properties p=new java.util.Properties();
p.put("user","ser");
p.put("password","heslo");
Connection conn=DriverManager.getConnection(url,p);
PreparedStatement ps=conn.prepareStatement("Select * from emp where empno = ? ");
ps.setInt(1,Integer.parseInt(args[0]));
ResultSet rs=ps.executeQuery();
ResultSetMetaData rm= rs.getMetaData();
int cols=rm.getColumnCount();
System.out.println();
for (int i=0;i<=cols;i++)
System.out.print(rm.getColumnName(i)+"\t");
System.out.println();
while(rs.next())
for (int i=1;i<=cols;i++)
System.out.print(rs.getString(i)+"\t");
System.out.println();
ps.close();
conn.close();
</code>
[root@server jdbc]# javac DbDemoPrepared.java
DbDemoPrepared.java:10: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
Class.forName("com.mysql.jdbc.Driver");
^
1 error
so how to proceed
with regards
rama kanththanks for your reply
but the driver class has been installed successfully there becuause
the other programs are running perfectly with the same driver.Wrong.
if at all we need to catch that exception i tried like this
try{
Class.forName("com.mysql.jdbc.Driver");
catch (SQLException e)
System.out.println("error"+e);
}This is Java 101. If the method in the try block throws a checked Exception X, then you have to have to have a catch block that handles it. That's what the compiler is telling you.
but its giveng the erroe like this
[root@server jdbc]# javac DbDemoPrepared.java
DbDemoPrepared.java:12: exception
java.sql.SQLException is never thrown in body of
corresponding try statement
catch (SQLException e)
^
DbDemoPrepared.java:10: unreported exception
java.lang.ClassNotFoundException; must be caught or
declared to be thrown
Class.forName("com.mysql.jdbc.Driver");
^
2 errorsWhy isn't the advice the compiler is giving you good enough?
>
>
>
with regards
rama kath
Better go back and re-read the intro Java tutorial. -
Prepared statement error-reply soon please
hi,i am using a preparedstatement ,i get an error that i am not able to figure out.please help.heres the code
i have a table called fun with two fields
String temp="fun"; //the table name will vary so its kept a variable
String query="insert into"+temp+"values(?,?)";
PreparedStatement samp=prepareStatement(query);
samp.setInt(1,2);
samp.setString(2,"adsd");
samp.executeQuery();
when i execute this it gives an SQL Exception
missing INTO keyword.
i have also tried it with executeUpdate().it gives the same error.what could be the problem.can i give the table name dynamically in some otherway.the same method works fine for create table but errors for insert statement.how can this be corrected.bye thiyagu.String query="insert into"+temp+"values(?,?)";This line is wrong because you have no space after the into or before values.
This should work...
String query="insert into " + temp + " values(?,?)"; -
JSP Deployment:Tomcat:Oracle Prepared Statement error
I'm deploying my BC4J JSP application to Linux/Tomcat 4.0.1.
The html and basic jsp (Query form display) work but whenever I try to hit the database (i.e. display a browse or execute a query), I get the following in the Browser window:
Application Error
Return
Error Message: oracle.jdbc.driver.OraclePreparedStatement
There are no other messages. Everything works in the JDeveloper IDE.
I'm sure I've done something wrong in the configuration.
Can anyone point me in the right direction?
TIA
Thanks, GeorgeThanks for the info Sung.
We solved the problem late yesterday. The Tomcat documentation indicates that .jar files shared by the application and the server must reside in <Tomcat_home>/common/lib/. However, we went by the JDeveloper document which stated that most of the library files belong in <Tomcat_home>/lib/.
When we moved classes12.jar to /common/lib/ the problem was resolved.
In order to resolve other problems that arose, we had to move all of the indicated .jar files for JDeveloper into /common/lib/.
One of the JDeveloper documentation folks should probably evaluate this for a change to the documentation.
Thanks for your help!
Thanks, George -
XaResource.prepare Method Error
When we execute the xaresource.prepare(); throws an exception of:
RuntimeException in method: public abstract void transaction.bean.TransactionManager.insert(common.valueObject.VOInsert,java.lang.String) throws java.lang.Exception,java.rmi.RemoteException:
java.lang.NullPointerException
at org.postgresql.util.Base64.encodeBytes(Base64.java:306)
at org.postgresql.xa.RecoveredXid.xidToString(RecoveredXid.java:51)
at org.postgresql.xa.PGXAConnection.rollback(PGXAConnection.java:287)
this is the code:
private boolean canBeCommited(Vector<XAResource> resources, Xid xid, int actualResource ) throws Exception
try {
System.out.println("resources.get(actualResource) -> " + resources.get(actualResource));
System.out.println("xid -> " + xid);
int ret = resources.get(actualResource).prepare(xid);
if(ret == XAResource.XA_OK)
if (actualResource==0)
return true;
else
return canBeCommited(resources,xid,actualResource-1);
else
return false;
catch (XAException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
throw e;
}You may need to recompile your class with jar(s) from 11g.
If you have problems to make it running, take a sample component containing a serviceHandler from HowTo Components 11g and just adjust it to your needs. The link to components: http://bexhuff.com/2011/03/howto-component-samples-for-oracle-ucm-11g -
Weblogic 8.1 Oracle prepared statement error
I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using the Oracle Thin
driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test that uses
an XA connection, I get the error below (inside a much larger stack trace). I'm
not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyone familiar with
what the code is trying to do here?
[junit] --------------- nested within: ------------------
[junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Failed
to generate class for weblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_PreparedStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
] - with nested exception:
[junit] [java.lang.reflect.InvocationTargetException - with target exception:
[junit] [java.lang.ArrayIndexOutOfBoundsException: 142]]
[junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
[junit] at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
[junit] at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
[junit] at weblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:222)
[junit] at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142)Craig,
Normally AssertionError means that you hit the bug. Contact [email protected]
for a resultion.
Regards,
Slava Imeshev
<Craig Daniels cldanielsATcheckfree.com> wrote in message
news:[email protected]..
>
I've got WLS 8.1SP1 running on Mac OS X (10.2.6, JDK 1.4.1) using theOracle Thin
driver to connect to a 9.2.0.1 db on WinXP. When I run a unit test thatuses
an XA connection, I get the error below (inside a much larger stacktrace). I'm
not getting this error with 7.0SP2 (with Mac JDK 1.3.1). Is anyonefamiliar with
what the code is trying to do here?
[junit] --------------- nested within: ------------------
[junit] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[Failed
to generate class forweblogic.jdbc.rmi.internal.PreparedStatementImpl_weblogic_jdbc_wrapper_Prepa
redStatement_oracle_jdbc_driver_OraclePreparedStatement_811_WLStub
] - with nested exception:
[junit] [java.lang.reflect.InvocationTargetException - with target
exception:> [junit [java.lang.ArrayIndexOutOfBoundsException: 142]]
[junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:807)
[junit] atweblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:790)
[junit] atweblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:79)
[junit] atweblogic.rmi.utils.io.RemoteObjectReplacer.resolveObject(RemoteObjectReplace
r.java:222)
[junit] atweblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:142) -
Problem preparing imovie error code project too long
I am creating imovie which is only 16 minutes long and has still images and songs. Previous copy was copied using iDVD but now error message comes up saying project is too long. Please Help.
A DVD can actually hold up to 120 minutes, including titles etc.
Best Performance is for movies of up to 60 minutes.
Best Quality is for movies of 61 - 120 minutes.
In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
(And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.)
An alternative, if your project can not be edited down to 120 minutes, is to use Toast for the burning, which has a setting 'compress to fit' for longer projects, albeit with a minimal quality loss. -
Hi,
I'm trying to execute a simple delete statment:
DELETE FROM SecurityRate sr
WHERE sr.assetId = :assetId
AND sr.relevanceDay = :relevanceDay
AND sr.cDataSourceId = :dataSource
AND sr.cTradingTypeId = :tradingType
AND sr.securityRateId > 0
But all I got it's the next exception:
FINE: DELETE FROM SECURITY_RATE WHERE (((((ASSET_ID = ?) AND (RELEVANCE_DAY = ?)) AND (C_DATA_SOURCE_ID = ?)) AND (C_TRADING_TYPE_ID = ?)) AND (SECURITY_RATE_ID > ?))
bind => [5100029, 2006-08-30, 3, 24, 0]
27/04/2007 15:37:34 com.evermind.server.ejb.logging.EJBMessages logException
SEVERE: [SecuritySession:public void com.tm.business.securities.SecuritySessionBean.createSecurityRateFromFile(com.tm.persistence.securities.ejb.SecurityRate)] exception occurred during method invocation: javax.ejb.EJBException: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.; nested exception is: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
javax.ejb.EJBException: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.; nested exception is: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:269)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.find(EntityManagerImpl.java:130)
at com.evermind.server.ejb.persistence.AbstractEntityManagerProxy.find(AbstractEntityManagerProxy.java:58)
at com.tm.infra.session.EntityManagerContext.insert(EntityManagerContext.java:182)
at com.tm.infra.session.EntityManagerWrapper.insert(EntityManagerWrapper.java:142)
at com.tm.business.securities.SecuritySessionBean.createSecurityRateFromFile(SecuritySessionBean.java:459)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.MethodBasedInterceptor$EJBInvocationCallbackImpl.proceed(MethodBasedInterceptor.java:110)
at com.tm.infra.session.EntityManagerWrapper.trace(EntityManagerWrapper.java:364)
at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.MethodBasedInterceptor.invoke(MethodBasedInterceptor.java:47)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at SecuritySession_LocalProxy_d7ebed.createSecurityRateFromFile(Unknown Source)
at com.tm.infra.files.handlers.File24Handler.handle02Record(File24Handler.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.tm.infra.files.ejb.FileExtractorSessionBean.handleRecord(FileExtractorSessionBean.java:471)
at com.tm.infra.files.ejb.FileExtractorSessionBean.extractFile(FileExtractorSessionBean.java:270)
at com.tm.infra.files.ejb.FileExtractorSessionBean.extractFile(FileExtractorSessionBean.java:81)
at com.tm.infra.files.ejb.FileExtractorSessionBean.activateFileExtractor(FileExtractorSessionBean.java:748)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.MethodBasedInterceptor$EJBInvocationCallbackImpl.proceed(MethodBasedInterceptor.java:110)
at com.tm.infra.session.EntityManagerWrapper.trace(EntityManagerWrapper.java:364)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.MethodBasedInterceptor.invoke(MethodBasedInterceptor.java:47)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxNeverInterceptor.invoke(TxNeverInterceptor.java:51)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at FileExtractorSession_LocalProxy_d7ebed.activateFileExtractor(Unknown Source)
at com.tm.view.actions.operational.FileUploadActions.extractFile(FileUploadActions.java:39)
at com.tm.view.backing.operational.FileUpload$FileExtractorThread.run(FileUpload.java:149)
at java.lang.Thread.run(Thread.java:595)
Any ideas?
Thanks ShacharYou could use it like this:
DELETE FROM forecast f
WHERE (f.lmp, f.dt) IN (SELECT cy.lmp, cy.dt
FROM (SELECT lmp, change_sd, add_months(dt, 12) AS dt FROM forecast WHERE event = 'GROWTH RATE') ny --next year,
(SELECT lmp, change_sd, dt FROM forecast WHERE event = 'GROWTH RATE') cy -- current year
WHERE ny.change_sd = cy.change_sd
AND ny.dt = cy.dt
AND ny.lmp = cy.lmp);Not sure if you just want to delete rows with event = 'GROWTH RATE' or a matching change_sd also, if you do you'll have to add it there to the where.
DELETE FROM forecast f
WHERE (f.lmp, f.dt) IN
(SELECT cy.lmp, cy.dt
FROM (SELECT lmp, change_sd, add_months(dt, 12) AS dt FROM forecast WHERE event = 'GROWTH RATE') ny --next year,
(SELECT lmp, change_sd, dt FROM forecast WHERE event = 'GROWTH RATE') cy -- current year
WHERE ny.change_sd = cy.change_sd
AND ny.dt = cy.dt
AND ny.lmp = cy.lmp)
AND f.event = 'GROWTH RATE'; -
Select Statment Error (SQL)
Dear Friends,
LOOP AT IT_ZSD012_001 INTO WA_ZSD012_001.
SELECT A~MATNR A~LABST A~UMLME A~INSME A~EINME A~SPEME A~RETME B~MTART
APPENDING TABLE IT_INVENTORY
FROM MARD AS A
INNER JOIN MARA AS B ON B~MATNR EQ A~MATNR
WHERE A~MATNR = '1.1.1'
and A~WERKS EQ WA_ZSD012_001-PARAM_1
AND A~LGORT EQ WA_ZSD012_001-VALUE
AND A~LABST GT 0
OR ( A~UMLME GT 0
OR A~INSME GT 0
OR A~EINME GT 0
OR A~SPEME GT 0
OR A~RETME GT 0 )
AND B~MTART IN ('ZFG1' , 'ZFG4' , 'ZR12' ).
ENDLOOP.
this is my code (select statement)
but this is not working, when i execute this so many materials came to the itab it should come only "1.1.1"
my requirement is i want to get data from MARD agaist WERKS, LGORT and also MARA-MTART in that groups.
its came with zero inventory, i want to avid them how can i do this.
hope you can understand what i an said?
Thanks in advancedHi Nelson,
For better performance try to avoid using join statements. Use for all entries instead.
Never use select staments in Loops.
try your code following way
if it_zsd012_001 is not initial.
select matnr labst umlme insme einme speme retme
from mard
appending table it_inventory
for all entries in it_asd012_001
where matnr = '1.1.1'
and werks = it_asd012_001-param_1
and lgort = it_asd012_001-value
and (labst gt 0 or insme gt 0 or einme gt 0 or speme gt 0 or retme gt 0).
if sy-subrc eq o.
select mtart from mara
into table it_mara
for all entries in it_inventory
where matnr = it_enventoty-matnr
and mtart in ('ZFG1' , 'ZFG4' , 'ZR12' ).
endif.
endif.
"Then just merge two table into third one.
Hope it will help to solve your query,
Pratik
Maybe you are looking for
-
Items In Library, Not Available On iPod
I posted a few days ago about this, but the post is now so buried below it is unlikely to be seen, so here we go again with a new post. I hope this is more acceptable than "bumping" the other post up. My iPod recently updated itself when plugged in,
-
im confused about all the hyperion add in does all of them open and edit in the data forums ? the add in is excel add in and smart view planning provider and smart view essbase provider
-
My app store does not show in my applications folder nor does it work when I attempt to use it. I never have an update for it when I do a software update. Also, I lost my applications dvd after a move, so if I need that to get it back how or can I ge
-
FOLIO PANEL NOT SHOWING UP UNDER WINDOW MENU:
I have installed the D-Pub update and per Adobe's India support team [:-( ] I uninstalled the whole program and reinstalled it as they suggested - that did not help at all and was a complete waste of time. so does anyone know how to get the Folio pan
-
I am getting below error....I have two laptops with 11g and I am getting this error on both laptops......I am using Oracle 11g XE database on both boxes.....I can see the OBI Sign In page, when I enter the userid password it says - invalid userid or