Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2008
    Posts
    8

    Unanswered: 507 character limit?

    I have wrote an insert sql statement. The last field is SQL_STATEMENT, it is a string that is a SQL statement (I want to store an SQL statement in my table). My update statement runs without any errors but it truncates the SQL_Statement field at 507 characters. The field is set to 6000 char. The sql statement is below followed by the value in the database for SQL_STATEMENT.

    Any help would be appreciated.

    INSERT INTO VBA_ERROR_LOG (NUMBER, DESCRIPTION, SUB_EVENT, ORIGINAL_EVENT, REF, COMPANY_NUMBER, COMPANY_NAME, SCREEN, STATE, MODE, M2M_LOGIN, M2M_GROUP, DATE_TIME, WINDOWS_LOGIN, PC_NAME, RECORD, VBA_VERSION, GLOBAL_ERROR, SQL_STATEMENT) VALUES (11, 'Division by zero', 'SAVE', 'SAVE', 1, 01, 'INWOOD OFFICE FURNITURE INC.', 'ARINV', 'PARENT', 'VIEW', 'SCOTT ', ' ', '12/8/2008 3:19:27 PM', 'sah', 'PC011-SCOTT-HAN', 'Invoice #: 109333 ', '12/8/2008', 0, ' BEGIN TRANSACTION UPDATE ARITEM_EXT SET REP1P = 02, REP1C = 1, REP1D = 3, REP1B = 149.9, REP2P = 02, REP2C = 1, REP2D = 3, REP2B = 149.9, SPIFFP = 0, SPIFFC = 0, SPIFFD = 0, SPIFFB = 0, INSTALLERP = 0, INSTALLERC = 0, INSTALLERD = 0, INSTALLERB = 0, DIRECTP = 0, DIRECTC = 0, DIRECTD = 0, DIRECTB = 0, BIGP = 0, BIGC = 0, BIGD = 0, BIGB = 0, INDSTATP = 0, INDSTATC = 0, INDSTATD = 0, INDSTATB = 0, GSAP = 0, GSAC = 0, GSAD = 0, GSAB = 0, DESIGNERB = 143.9, ZONE = 0, PAYC = 1 WHERE FKEY_ID = 203416 COMMIT;')




    BEGIN TRANSACTION UPDATE ARITEM_EXT SET REP1P = 02, REP1C = 1, REP1D = 3, REP1B = 149.9, REP2P = 02, REP2C = 1, REP2D = 3, REP2B = 149.9, SPIFFP = 0, SPIFFC = 0, SPIFFD = 0, SPIFFB = 0, INSTALLERP = 0, INSTALLERC = 0, INSTALLERD = 0, INSTALLERB = 0, DIREC

  2. #2
    Join Date
    Nov 2008
    Posts
    8
    I forgot to mention:

    SQL Server 2000
    I am running the statement in Query Analyzer.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Check the column length limit in Query Analyzer. I'd bet that both your SQL and the server's response are just fine.

    -PatP

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    What is the maximum length of the display in your Query Analyzer (Tools->Options-> Results Tab)?

  5. #5
    Join Date
    Nov 2008
    Posts
    8
    256! I changed it to 6000 and now it shows it all.

    Thank you!

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You can go as high as 8k.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

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