1. You'll have to ALTER it seperately.
2. insert into SCHEMA.DBCFG select a.*, current timestamp from sysibmadm.dbcfg a
User Profile
Collapse
-
-
You could do it like this
SELECT NO_ID,
(SELECT B.SHF FROM TABLE B WHERE B.DATE_TRANS = '2010-08-21') DATE_TRANS_21,
(SELECT B.SHF FROM TABLE B WHERE B.DATE_TRANS = '2010-08-22') DATE_TRANS_22,
(SELECT B.SHF FROM TABLE B WHERE B.DATE_TRANS = '2010-08-23') DATE_TRANS_23
FROM TABLE A
GROUP BY NO_ID
or
SELECT NO_ID,
MAX((CASE WHEN DATE_TRANS = '2010-08-21' THEN SHF ELSE 0 END)) DATE_TRANS_21,...Leave a comment:
-
You could also use something like this, in case there are gaps in the sequence and you want to set a particular column to the same value..
UPDATE TABLE SET COL = VALUE
WHERE ID IN (SELECT ID FROM TABLE ORDER BY ID FETCH FIRST 1000 ROWS ONLY);
Thesmithman's options are perfect too btw - depends what you've gotta accomplish.Leave a comment:
-
Anand Kaushal replied to How to declare timestamp variable with default as current timestamp not working.in DB2Cannot specify a default like that.. set the variables instead.Leave a comment:
-
This might help
select r,c1,c2,c3
from table(
select row_number() over(partition by c1,c2 order by c3) r, c1, c2, c3 from table(values (1,1, 'abc'), (1, 1, 'dev'),(1, 2, 'rst'),(1, 3, 'ndb'),(1, 3, 'mnv')) t(c1,c2,c3) order by c1,c2,c3
)
where r=1Leave a comment:
No activity results to display
Show More
Leave a comment: