Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    18

    Unanswered: Is my Sybase UPDATE too long ? Any limit ?

    Hello,
    I couldn't execute the following UPDATE statement. It would generate this error and stop the Sybase service. I guess my Sybase UPDATE statement is too long, is there any limit on a Sybase UPDATE statement ?

    Error message :
    Could not execute statement
    JZ006: Caught IOException:
    com.sybase.jdbc3.jdbc.5ybConnectionDeadException: JZ0C0:Connection is already closed.
    SQLCODE=0, ODBC 3 State="JZ006"

    Is this UPDATE statement too long ?

    UPDATE XF_STORE SET XF_ADDRESS1 = ' 1',
    XF_LASTMODBY = '05051', XF_LASTMODDATE = '2011-09-19 00:00:00.000' , XF_LOCATIONSEGMENT = 'HQ01.TR01'
    WHERE XF_STORECODE = 'TR01' AND XF_NAME = 'Training' AND XF_PROFILEID = '001' AND XF_COUNTRY = '1'
    AND XF_ADDRESS1 = 'training' AND XF_ADDRESS2 IS NULL AND XF_ADDRESS3 IS NULL AND XF_ADDRESS4 IS NULL
    AND XF_TELEPHONE IS NULL AND XF_FAX IS NULL AND XF_TYPE = '1' AND XF_ACTIVE = '0' AND XF_NUMTILL = 1
    AND XF_WAREHOUSE = 'HQ01' AND XF_RENTAL IS NULL AND XF_SHOPAREA IS NULL AND XF_COMMDATE IS NULL AND XF_DEMOGPROMPT = 'C'
    AND XF_MINDEMOG = '0' AND XF_MAXDEMOG = '3' AND XF_DEFCASHF IS NULL AND XF_SPECREQUEST = '0' AND XF_REPLSEQ = 999
    AND XF_REPLBAT = '1' AND XF_ALLOTYPE IS NULL AND XF_RETAILCHAIN = '*' AND XF_DISTRICTCODE IS NULL AND XF_SHOPGROUP IS NULL
    AND XF_ADCODE IS NULL AND XF_ZONEID IS NULL AND XF_NUMOFCONNECTION = 1 AND XF_STORESERIALID = '6S'

    -- But if I commnet out these WHERE conditions, the UPDATE statement
    --could finish successfully, is there limit on a Sybase UPDATE statement's
    --length ?
    AND XF_LASTMODBY = '05051'
    AND XF_LASTMODDATE = '2011-09-15 00:00:00.000' AND XF_COSTCENTER = 'HKCC01'
    AND XF_LOCATIONSEGMENT = 'HQ01.TR01' AND XF_PRICECENTER = 'HKPC01' AND XF_ATTRIBUTE1 = '0'

  2. #2
    Join Date
    Oct 2011
    Posts
    2
    are u sure there is no problem in this condition :

    AND XF_LASTMODDATE = '2011-09-15 00:00:00.000'


    are u sure about the date format ?

  3. #3
    Join Date
    Sep 2008
    Posts
    18
    Thanks.
    I found out the cause of the error but I don't know why it would generate the error :

    sp_configure "capture missing statistics", 0

    It would my SQL statement worked but I didn't know the reason of it. Any ideals ?

Posting Permissions

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