Questions tagged [udb]
16 questions
6
votes
3 answers
Datatype conversion in IBM DB2: BIGINT to VARCHAR
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…

jrharshath
- 25,975
- 33
- 97
- 127
3
votes
3 answers
Development Tools like PL/SQL Developer for IBM DB2 for i (iSeries)
I am exprienced in working with PL/SQL Developer on Oracle.
Now I have a customer, where I need to write some stored procedures on an IBM DB2 for i (formerly known as DB2 UDB for iSeries, AS400).
Is there for IBM DB2 a tool like PL/SQL Developer…

user2071475
- 53
- 1
- 4
2
votes
3 answers
Keep First N number of rows and delete the rest
trying to write a sql which will keep first N number of rows of a table and delete the rest. I'm have comeup with this sql but the its saying I can't use the count here. Please help me to re write the sql.
DELETE
FROM ZZ_TEST_FINTABLE
WHERE…

user3396478
- 176
- 2
- 13
2
votes
1 answer
DB2 Alternate to EXISTS Function
I have the below query in my application which was running on DB2:
SELECT COD.POST_CD,CLS.CLASS,COD2.STATUS_CD
FROM DC01.POSTAL_CODES COD
INNER JOIN DC02.STATUS_CODES COD2
ON COD.ORDER=COD2.ORDER
INNER JOIN DC02.VALID_ORDERS ORD
ON…

user2986298
- 21
- 1
- 2
1
vote
2 answers
db2 Restored database size vs source database size
When a DB2 database is restored and recovered from backups
is the restored database a physical copy - ie: identical block for block with the source database (as it was at time of backup) - and of identical size of source database?
or
is the…

Tom12345
- 11
- 4
1
vote
0 answers
UDB peer to peer on the same machine
I want to make sure that I understand the concept
we have example.exe and we will run it 5 times or more on the same computer
example.exe will create a pear (which has a sending and receiving socket)
and the sending socket sends on a fixed port…

Rehab Reda
- 193
- 7
- 16
0
votes
1 answer
Improving query performance of of database table with large number of columns and rows(50 columns, 5mm rows)
We are building an caching solution for our user data. The data is currently stored i sybase and is distributed across 5 - 6 tables but query service built on top of it using hibernate and we are getting a very poor performance. In order to load the…
0
votes
1 answer
Store generated primary key in temp variable db2
I'm in the process of writing batch loading SQL script and I would like to store the generated primary key of an insert statement into a temp variable and use it to reference the foreign key in the other tables. Any ideas?
I'm doing the following:
Y…

user1022900
- 13
- 2
0
votes
0 answers
How to convert JSON document with arrays to relational table using JSON_Table - UDB v.11.1
Newbie here. Can someone please help me? I'm trying to use "JSON_TABLE" to convert a json document with arrays into a relational table, but I'm getting the following error. I'm using DB2-Linux v11.1. Thank you in…

EastBayBulldogz
- 1
- 1
0
votes
1 answer
Aggregate results in SQLAnywhere 16 (For XML replacement)
I'm using Ultralite 16.0 and trying to aggregate multiple rows into one.
I have a film table and a genre table, that have a many-to-many relationship through the film_genre table.
I want a result like this:
| mFilm | idGenre |
| --------- |…

Marianne Rojas
- 53
- 6
0
votes
3 answers
DB2 equivalency for Teradata clustered tables
In Teradata the definition of a clustered table is very simple and exists in a single syntax (correct me if I'm wrong).
CREATE TABLE table_name (charcol1 varchar(10), idcol integer)
primary index (idcol);
I am reading that there are a whole number…

access_granted
- 1,807
- 20
- 25
0
votes
0 answers
Deploy stored procedure scripts to mulitple Databases and instances in DB2
I am new to DB2/UDB. I have a 3 instances each instance have different number of databases below.
instance_1 - 20 databases
instance_2 - 18 databases
instance_3 - 16 databases
Totally I have 54 DBs. All are in sync now. I have developed a stored…

StackUser
- 5,370
- 2
- 24
- 44
0
votes
1 answer
Display table contents in UI
Is there any tool which shows the H2 or UDB DB table contents in UI. I dont want to run the query to see the contents of the table.This is more like the Presentation of the tables in UI. Also I dont want to use any Db consle.Please suggest.

DarkCrow
- 785
- 2
- 8
- 29
0
votes
1 answer
Oracle Migration Workbench
Does anybody know anything about using Migration Workbench to migrate db2 database to oracle 10G? I am getting a strange SQL1402N error when I try to get source capture.
user187437
0
votes
1 answer
How do I create control tables in DB2 UDB for setting up new replication
How do I create control tables in DB2 UDB for setting up new replication

user130561
- 1,483
- 3
- 12
- 9