Questions tagged [db2-9.7]
9 questions
13
votes
2 answers
Spring jdbcTemaplate how to send complete batch size to DB2 server in one shot?
While jdbcTemplate.batchUpdate(...) is running I can see DB row count is increased gradually(by running count(*) in the table), initially 2k then 3k and goes till 10k. 2k and 3k are not exact numbers sometimes I get 235 and then 4567.
I was…

Vipin
- 4,851
- 3
- 35
- 65
3
votes
1 answer
How to setup IBM DB2 9.7 to work with Entity Framework 6 and Visual Studio 2015?
I'm using Visual Studio 2015 to develop an ASP.NET MVC application on a Windows 7, 64-bit machine and I want to connect to an IBM DB2 9.7 database using Entity Framework 6 (Code-First).
Background
I've found a number of articles online that…

user2063351
- 503
- 2
- 13
- 31
1
vote
2 answers
DB2 Temporary Table within Function
I have got simple functions to work in DB2 but I am unable to get any functions to work which declare a global temporary table. I am aware the DB2 version and platform is vastly different but I thought this should be possible as it worked for this…

corky
- 15
- 6
1
vote
1 answer
How to Setting two scalar variables in DB2 one SELECT/SET statement
I can do this in MSSQL:
declare @id1 int
declare @id2 int
select @id1 = id1 , @id2 = id2 FROM dbo.table_id
In db2 this construction does't work and not work this
declare id1 int
declare id2 int
set id1,id2 = (SELECT id1, id2 FROM dbo.table_id)
I…

Vitaliy Kushneruk
- 48
- 7
0
votes
1 answer
Dropping XML columns in DB2
I'm trying to drop an XML column in db2 in the following manner. But every time I do this, it is resulting in an error
create table One(name int, address XML);
alter table One add column age xml;
alter table One drop column age;
Error starting at…

sushmithaP
- 133
- 1
- 3
- 12
0
votes
1 answer
Perform join or lookup from table_1 of reference database to source read-only ODBC database to extract data
Excuse me, I'm a newbie (first question) and also new to SSIS 2008, so apologies if the question isn't constructed in an efficient way.
Context:
I wish to extract all the usage records from a source database on server A, to a target database on…

LeesS
- 1
- 1
0
votes
0 answers
sql query db2 9.7
Recursive query in DB2 to get items in the chain. There is a table
WITH t (id,a) AS (VALUES (1,3),(1,6),(1,9),(2,7),(2,11),(3,5))
SELECT * FROM t
The output should be like this
id | a
------------
1 | 3,6,9
2 | 7,11
3 | 5
How can I do…

Katerina
- 1
- 2
0
votes
0 answers
How to restore older database in db2 9.7
When restoring a database in DB2 you need to specify the rollforward. I have created a new database using:
db2 RESTORE DATABASE dbname USER adminuser USING 'adminpassword' FROM 'C:\databases' TAKEN AT 20161231131530 INTO newdbnew without…

davejal
- 6,009
- 10
- 39
- 82
0
votes
2 answers
SQL Grouping and counting together
I try to get the grouping elements as column and the count as row elements.
Possible Status = IO, NIO, OPEN, CLOSED, CANCELLED
Possible Types = TypeA, TypeB, typeC, typeD
MyTable (date, status, type, count)
2014-06-27,OPEN,typeA,…

Kayser
- 6,544
- 19
- 53
- 86