Tag Info

New answers tagged

0

Yes there is. You could do this with SQL PL to create a stored procedure to do this. Or if you prefer other script languages you could use KSH, BSH, or even Perl. The point being to catch the errors or exceptions (a little easier to do with SQL PL IMHO) and then you can react to them the way you wish.


1

I agree with what others have said, it is most likely a problem with the statement terminator. Try adding: --#SET TERMINATOR @ CREATE OR REPLACE TRIGGER B_TRIGGER [...] @ --#SET TERMINATOR ; You might also consider using for example @ as your statement terminator globally. Another "undocumented" feature is to quote the ; in the trigger using to ending ...


1

REGEXP_LIKE is now available in DB2 for iSeries - see: http://www.itjungle.com/fhg/fhg051915-story01.html


2

I believe you can do so through IBM Data Studio. I would use that tool anyway as that is now the approved IBM tool for interacting with DB2 and Control Center is deprecated.


3

Determine the largest current ID value: select max(TIMESHEET_ID) from PROJECTMGMT.TIMESHEET then reset the identity value: alter table PROJECTMGMT.TIMESHEET alter column TIMESHEET_ID restart with <whatever the max value is + 1>


0

GENERATE BY DEFAULT means that you can provide a value or you can allow DB2 to provide a value. If you use GENERATE BY DEFAULT and you provide a value, you may need to ALTER TABLE to reset the identity as DB2 will retain the last value it was at (rather than what you inserted into the table). GENERATE ALWAYS means just that. Only DB2 can create values for ...


1

It appears to be a bug in the way Squirrel handles additional parameters. Data Studio acts as expected with both db2jcc and db2jcc4 drivers. I have filed a bug to: https://sourceforge.net/p/squirrel-sql/bugs/1201/



Top 50 recent answers are included