I use a stored procedure to read/update/return certain fields in a journaled as400 table.
I want to lock the table first and then release it after the record is updated. I
tried tons of stuff, but releasing table is a problem. SP defines and opens cursor,
selects record into variables and updates the record. I tried 'begin atomic', th...
What's the DB2 Version of TSQL Print?
I've tried
Print 'TableName:X'
And
Select 'X' As 'TableName'
...
My colleagues and I have several hundred SQL stored procedures sitting on a hosted DB2/z database (version 8.1). We have no administrator rights and our access to the database is via QMF screens. Downloads are done through the 3270 terminal session with the TSO FT command.
Is there a simple/efficient way to extract the definitions/text ...
Is there an IBM Driver so we can use Linq to Entity framework to connect to DB2 and generate the DB2 entities on the desinger edmx file? Any links would be greatly appreciated
...
Is there a free option to connect to DB2 via ODBC on within my .NET app? I believe the most common ways require a license:
Data Direct $$$$
IBM Client Access
Host Integration Server
I just want to install an ODBC driver that I could access from a C# app.
...
I have to unload a table which contains field with ROWID datatype. I could not unload the table through QMF as it is not supporting this data typr. Is there any other way to unload the table?
...
If we have a view over another view and we drop th eparent view what happens to the other view and if we recreate teh base view wil the second view be active again
...
I have to create the trigger(s) which will keep the audit of my table. The trigger is supposed to execute on both insert and update.
currently i am having two triggers
One for Insert:
CREATE TRIGGER SCH.TRG_TBL1_AFT_I
AFTER INSERT ON SCH.TBL1
REFERENCING
NEW AS n
FOR EACH ROW
MODE DB2SQL
INSERT INTO SCH.TBL1_AUDIT
VALUES(...
I perform some actions on a table retrieved from a db2 database row by row in a C# project.
but when I try to update it using cursors row by row to the database using the following statement
selectCommand.CommandText = "DECLARE crsr1 CURSOR FOR select * from " + tableName+" ;" ,
an exception is generated.
From my understanding of this...
I am trying select multiple conditional summaries into a single table result on a DB2 based database.
Example:
SELECT COUNT(FOO) FROM T1 WHERE T1.A=1 AS A_COUNT,
SELECT COUNT(FOO) FROM T1 WHERE T1.B=2 AS B_COUNT
Ext...
Any help is appreciated.
...
I am working on a project, which is having huge database. [ around 32gb data in one week ]. We are using DB2, and spring-framework + jdbc. I just wanted to know is JDBC capable of handling this much of data? Or should i use something else? Or if JDBC is capable of doing this then should i use some specific technique for this thing.
...
Earlier we were using 'GENERATED ALWAYS' for generating the values for a primary key. But now it is suggested that we should, instead of using 'GENERATED ALWAYS' , use sequence for populating the value of primary key. What do you think can be the reason of this change? It this just a matter of choice?
Earlier Code:
CREATE TABLE SCH.TAB...
Excerpt from code
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM sch.tab1 where col1 like lower ( 'ABZ' ) ");
preparedStatement.executeQuery();
The above code executes successfully.
But when i try to execute this
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM sch....
I have a middle size query with 500.000 registers from an Oracle to an DB2 system through a DBLink. Can this query block the DB2 table so that it can be updated until i close the DBLink or until i finish the job whith the query (an insert-select into an Oracle table)
...
I'm writing a query to do some stuff. But its not working the way I want it to:
select CORR_ID from TABLE1
where CORR_ID not in (select id from TABLE2)
The problem is, TABLE2.id is a long, while TABLE1.CORR_ID is a string.
So how can I make it work?
PS: I'm using IBM UDB.
...
I am a developer who is looking for an Enterprise-ready web application framework for Python. My main concern is long-term support, extensive feature set and reliability.
I have been experimenting with Pylons and after my horrendous experience with Ruby on Rails on Windows where I even had to compile my own Postgres driver, Pylons and P...
howdy!
I can get row count from system table in db2 using
select tabname,card from syscat.tables where tabname='?'
but this will give static row count,If I need to get dynamic one I need to run runstats on the table.
is there any other way apart from using count(*) ?
Cheers,
Prateek
...
Does anybody know of a web based something that would allow end users to interact (change selection) for an OLAP cube on DB2
...
Is there any way by which we can export the result of a select statment to CSV file, just like in MySQL.
MySQL Command;
SELECT col1,col2,coln into OUTFILE 'result.csv' FIELDS TERMINATED BY ',' FROM testtable t;
...
How do I create control tables in DB2 UDB for setting up new replication
...