Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    76

    Unanswered: SQL0010N error message for export

    DB2 WSE 11.1.1 on Windows Server 2012

    When I run this SQL sentence:
    Code:
    db2 -x "export to export_filename of del modified by nochardel select 
           'select ' || substr(i.colnames, 2) || ' from tabschema1.' || t.tabname || ' where ' || substr(i.colnames, 2) || ' in (' || substr(xmlserialize(xmlagg(xmltext(CONCAT(',' , t.id_pk))) as VARCHAR(20000)), 2) || ')' || chr(33),
           chr(10) || chr(13) || 'select ' || substr(i.colnames, 2) || ' from tabschema1.' || t.tabname || '_aaa where ' || substr(i.colnames, 2) || ' in (' || substr(xmlserialize(xmlagg(xmltext(CONCAT(',' , t.id_pk))) as VARCHAR(20000)), 2) || ')' || chr(33)
      from (
            select coalesce(f.tabname, a.tabname) tabname,
                   coalesce(f.id_pk, a.id_pk) id_pk,
                   f.fecha_hora_creacion fecha_hora_creacion_ffff,
                   a.fecha_hora_creacion fecha_hora_creacion_aaa
              from tabschema2.registro_borrado f
                       full outer join tabschema2.registro_borrado_aaa a on (f.tabname = a.tabname
                                                                         and f.id_pk = a.id_pk
                                                                        )
             where (f.fecha_hora_creacion is null or a.fecha_hora_creacion is null)
               and coalesce(date(a.fecha_hora_creacion), date(f.fecha_hora_creacion)) = current date - 1 days
             order by coalesce(f.tabname, a.tabname), coalesce(f.id_pk, a.id_pk)
           ) t,
           syscat.indexes i
     where t.tabname = i.tabname
       and i.tabschema = 'tabschema1'
       and i.uniquerule = 'P'
     group by case when t.fecha_hora_creacion_ffff is null
              then 'F'
           when t.fecha_hora_creacion_aaa is null
              then 'A'
           end,
           t.tabname, i.colnames
     order by t.tabname"
    This error message appears in db2diag.log:
    Code:
    2017-06-05-04.20.02.000000-240 I43342F577           LEVEL: Error
    PID     : 7480                 TID : 4860           PROC : db2bp.exe
    INSTANCE: DB2                  NODE : 000           DB   : DB_NAME
    APPID   : *LOCAL.DB2.170605082002
    HOSTNAME: XXXX12K41
    EDUID   : 4860
    FUNCTION: DB2 UDB, database utilities, sqluCheckSqlcode, probe:621
    MESSAGE : SQL0010N  The string constant beginning with "'''" does not have an 
              ending string delimiter.
    DATA #1 : String, 12 bytes
    sqlugtpi.SQC
    DATA #2 : String, 44 bytes
    Error from Import/Export or Load Processing.
    The export runs without problems.
    The error message appears only when I run the export. When I omit "export to export_filename of del modified by nochardel" and run only the select, there is no error message in db2diag.log.

  2. #2
    Join Date
    Apr 2012
    Posts
    1,135
    Provided Answers: 25
    Possibly an issue with the data. Do you need to care about the data-values in the tables? You don't write whether the resultset is identical-values between export and select.
    To find the data triggering the warning, try eliminations.
    Alter the export to select different subsets of rows (and/or different tables), watching until you find the subset that triggers the warning in db2diag, then narrow it down iteratively.
    Another approach is to deliberately use a specific delimiter that's not in the data values, then search the resulting outputile to find mismatched quotes on each exported-line, with a suitable script in perl or whatever scripting tool you have available on Windows-Server.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •