Expert Knowledgebase
DB2 with Craig Mullins
Using a trigger to add default to existing column
(10 FEB 2005)
About adding a default value to an existing column in DB2, could you
accomplish the same effect by adding an insert trigger to the table?
Converting VSAM calls to SQL
(10 FEB 2005)
I have a CICS/VSAM program where I am moving from VSAM to DB2 and
replacing the VSAM data calls with the SQL queries. Can you please tell me
what will be the equivalent for the READ FOR UPDATE in DB2 when i...
Problems with date arithmetic while porting Oracle DB to DB2
(10 FEB 2005)
I am basically an Oracle guy who is now porting an enterprise DB to
UDB. I am facing lots of problems related to date arithmetic. Oracle
provides the ubiquitous TO_CHAR, TO_Date, ADD_DAYS, etc. for this
p...
Returning first 10 rows in SPUFI
(10 FEB 2005)
I am in SPUFI attempting to perform a DB2 SQL Select and only want to
return the first 10 rows (no particular order). My normal query is
'SELECT * FROM tablename'. Do I need something special in my 'WHERE...
Comparing performance of SMALLINT, INTEGER, and DECIMAL
(10 FEB 2005)
I have to increase my data field from SMAllINT. Can anyone tell me
whether I should go for SMAllINT to INTEGER or SMALLINT to DECIMAL? Which
is better in terms of performance?
Returning only 10 records from results
(10 FEB 2005)
How can I achieve in DB2 the following SQL of Oracle, which gives
me 10 of the resulting records? I can change the rownum value to
fetch the additional records if needed.
select * from (select field.*, R...
Formatting decimal places
(10 FEB 2005)
I have a query which selects from DEC fields and displays as follows:
.00
100.00
I would like some formatting to display it as:
.00
100.00
Is there any way of doing this?
Does rollback affect all jobs in batch process?
(10 FEB 2005)
I have a batch process that updates my DB2 tables and issues commit at a
certain interval within the program. If I ran the process concurrently,
with say five jobs, and one of them abends, will the rollback...
Using CASE instead of Oracle's DECODE
(10 FEB 2005)
In Oracle DECODE can be used in a where clause.
For example:
WHERE DECODE (deptno,10,'HR', 20,'Sales') = 'Sales'
How can this be achieved in a DB2 query with the CASE statement?
Joining tables with a LIKE operator
(10 FEB 2005)
Is it possible to join two tables using a LIKE operator? Basically can
we have a LIKE operator between two columns, either of the same table or of
different tables?
Example: Below are tables R and S:
...
|
 |
|
|
 |
 |
 |
| TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of . |
|
| |
All Rights Reserved, , TechTarget |
|
|
|
|
|