سؤال

I am converting my regular table to partitioned table using timestamp column. However, the below code fails with sql error 2103 reason code 6. Please note that there are no referential(or foreign key constraints) on this table so wondering where I am going wrong. There is primary key and few indexes defined on TRANSACTION table. Kindly help !

I am not using any options as well for simplicity though I want to use ' KEEP, COPY_USE_LOAD,COPY_WITH_INDEXES' as option.

  CALL SYSPROC.ADMIN_MOVE_TABLE(
  'ADMIN',
  'TRANSACTION',
  '',
  '',
  '',
  '',
  '',  
  '(TRANSACTIONDATE) (STARTING FROM (1/1/2010) ENDING AT (1/1/2017) EVERY 1 MONTH)',
  '',
  '',
  'MOVE'
  )
هل كانت مفيدة؟

المحلول

The only problem seems to be your missing quotes for the dates. As they are enclosed in the string the have to be escaped (with a second single quote) like in my example:

CALL SYSPROC.ADMIN_MOVE_TABLE(
    'ADMIN',
    'TRANSACTION', 
    '', '', '', '', '',  
    '(TRANSACTIONDATE) (STARTING FROM (''1/1/2010'') ENDING AT (''1/1/2017'') EVERY 1 MONTH)', 
    '', '', 'MOVE' )
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى dba.stackexchange
scroll top