Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2015
    Posts
    5

    Unanswered: Syntax error on declare

    So I'm trying to trouble shoot a large script that's supposedly worked forever at my company, but I can't get it to run past the first declare statement in my testing. I even tried running the declare statement by itself, and it gives the same error:

    declare li_aut smallint;

    I've tried it both with and without the semicolon, and I get the same thing every time. SQLCODE 131, State 42000, which is a generic syntax error. Not useful.

    Any idea what's wrong with this thing?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you are running on ASE, you need to prefix the variable name with an @ sign. See http://infocenter.sybase.com/help/in...so/X315717.htm for details.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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