UPDATE MS_GENERIC_CSV SET
  DEFINE_NAME = /*:DefineName*/'pattern',
  SCHEMA_NAME = /*?SchemaName*/'',
  REC_SQL = /*?QueryFrom*/'',
  REC_WHERE = /*?QueryWhere*/'',
  UPDATE_DATETIME = /*:DateTime*/TO_DATE('20091224000000','YYYYMMDDHH24MISS'),
  UPDATE_ID = /*:Uid*/'nakayama',
  VERSION = CASE
    WHEN 0 < VERSION AND /*:Ykkb*/'0' = '0' THEN 0
    WHEN VERSION <= 0 AND /*:Ykkb*/'1' = '1' THEN 1
    WHEN VERSION = 999999 THEN 1
    WHEN VERSION = -999999 THEN 0
    WHEN VERSION <= 0 THEN VERSION - 1
    ELSE VERSION + 1
  END
WHERE
  ID = /*:Id*/6
  AND VERSION = /*:Version*/1
