Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2005
    Posts
    8

    Unanswered: 80 character limitation on VARCHAR variable

    I have this code:

    DECLARE v_insert VARCHAR(255);

    SET v_insert = 'INSERT INTO mytable (field1, field2, field3, field4, field5, field6, field7, field8 field9)';
    SET v_insert = v_insert || ' Select * from sometable';

    EXECUTE IMMEDIATE v_insert;

    Problem is the v_insert variable only holds 80 characters. The first assignment statement has more than 80 so it cuts it off. I tried 1000 in the varchar declaration.

    Is there another variable to use or is there a reason I'm limited to 80 characters?

    Blaise

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    How do you determine that "the v_insert variable only holds 80 characters"?

  3. #3
    Join Date
    Mar 2005
    Posts
    8

    80 char limit

    In the Development Center debug window. I was wondering if it's a problem with the debug window so I am trying to put the string out to a table right now.

  4. #4
    Join Date
    Mar 2005
    Posts
    8

    80 character limit

    Thanks for the lead n_i, when I inserted the data into a table I could see the full string. I just assumed the debugger was showing me the correct value.

    regards,
    Blaise

Posting Permissions

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