Cristi,
Are you looking to display the first row?
If so, you can try adding "FETCH FIRST ROW ONLY" to return one row. What version of DB2 are you using?
-PK
Hi all,
I have a web project and a Java project created in WSAD. The web project is deployed in an EAR project also in WSAD. Now in one of the classes in the Java project I try to look up a file from the system. When I try to do the same within the java project through a main method it...
YULIC,
The WITH HOLD is needed due to the COMMIT ON RETURN YES clause. Cursors get closed the moment there is a COMMIT unless you specify WITH HOLD.
Unless your application needs it, users generally use COMMIT ON RETURN NO, and let the calling program handle the commit.
Hope that helps...
Hi,
INSERT INTO xxx SELECT * FROM yyy WHERE <<conditions>>>
always goes for logging of rows and this causes it to run slow.
As Greg mentioned above, a batch load with a LOG NO froma flat file will be much faster.
-PK.Ganapathy
DB2 DBA
HI,
Another option is to use a tool like BMC Catalog Manager and do a DESCRIBE or (select S) against that table. There is a field to show the total length of the table.
-PK.Ganapathy
DB2 DBA
TCS
I.T.Analyst
Tata Consultancy Services
Rejip,
When an update error or abend occurs, the unit of work is not complete, so IMS would issue a ROLB. Otherwise, you can check for any invalid SQLCODES and issue an implicit CALL CBLTDLI USING ROLB,IO-PCB to rollback the changes.
-PK.
I.T.Analyst
Tata Consultancy Services
The reason you cannot directly connect to ODBC using Java is because ODBC is in C and C++ .So you need an interface to connect with it, which is provided by jdbc.
I.T.Analyst
Tata Consultancy Services
HI,
Marc's query above would reduce run time. The 2 ON clauses would possibly materialize the queries twice causing increase in run times.
Do you have the Explain output for the query?
-PK
I.T.Analyst
Tata Consultancy Services
Hi,
A % is for a wild card search. Even though NOT LIKE 'YYY' is valid, DB2 "sees" it as a NOT = 'YYY' which depending on the field values in your table will return a value or not.
-PK
I.T.Analyst
Tata Consultancy Services
Hi Ramkumar,
It looks like the SELECT has removed duplicate rows of the LEEN_ID.
What is your unique key for this table? Also, try with a SELECT COUNT(*) to get the number of rows affected.
Let me know the outcome.
-PK
I.T.Analyst
Tata Consultancy Services
HI,
You can find info about deadlocks in the DB2 Master Log on SDSF. You can look for errors 00C9008E which indicate deadlock.
How to kill threads? You may need to access to monitoring tools and kill the thread that you want.
Hope this helps.
-PK
I.T.Analyst
Tata Consultancy Services
I agree with Marc's query above.
One does not really need an ON clause for Inner joins, it might as well as be rewritten in a Table A, Table B format.
However, when it comes to LEFT or RIGHT Joins, this may be a problem with Node Numbers.
-PK
I.T.Analyst
Tata Consultancy Services
Hi,
I am assuming that this is a one-time load to the table where the PK has a new column attached to it.
If so, one option would be to "manually introduce" a default value that you want into the SYSREC(Unload of the file) and then load it with the new SYSPUNCH.
Is this what you were...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.