SQL0440

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hunter

    SQL0440

    Please see my error:

    [db2inst1@kslnx sqllib]$ db2 "values abs(1)"
    SQL0440N No authorized routine named "ABS" of type "FUNCTION" having
    compatible arguments was found. SQLSTATE=42884

    but I can find this function's defination in SYSCAT.FUNCTION S. How can I
    do?


  • Dave Hughes

    #2
    Re: SQL0440

    On 2004-04-12, Hunter scribbled:
    [color=blue]
    > Please see my error:
    >
    > [db2inst1@kslnx sqllib]$ db2 "values abs(1)"
    > SQL0440N No authorized routine named "ABS" of type "FUNCTION" having
    > compatible arguments was found. SQLSTATE=42884
    >
    > but I can find this function's defination in SYSCAT.FUNCTION S. How
    > can I do?[/color]

    Strange, I've tried the same, and I get:

    C:\SQLLIB\BIN>d b2 "values abs(1)"

    1
    -----------
    1

    1 record(s) selected.


    Just a minor suggestion, but have you tried the alternate syntax that
    you would normally use when specifying more than one value for the row?
    In other words, instead of

    db2 "values abs(1)"

    Have you tried:

    db2 "values (abs(1))"

    Finally, I'm running DB2 UDB v7 with FP11. What version are you on?

    HTH, Dave.

    --
    Dave
    Remove "_nospam" for valid e-mail address

    "Never underestimate the bandwidth of a station wagon full of CDs doing
    a ton down the highway" -- Anon.

    Comment

    • Serge Rielau

      #3
      Re: SQL0440

      Try VALUES CURRENT PATH
      Make dure SYSIBM and SYSFUN are listed
      If not:
      SET PATH = SYSIBM, SYSFUN, CURRENT PATH;

      I sometimes screw thid one by ommiting teh keyword CURRENT when adding
      schemate to the PATH. (In which case you get a schem named PATH instead
      of the current path)

      Cheers
      Serge
      --
      Serge Rielau
      DB2 SQL Compiler Development
      IBM Toronto Lab

      Comment

      • Dave Hughes

        #4
        Re: SQL0440

        On 2004-04-12, Serge Rielau scribbled:
        [color=blue]
        > Try VALUES CURRENT PATH
        > Make dure SYSIBM and SYSFUN are listed
        > If not:
        > SET PATH = SYSIBM, SYSFUN, CURRENT PATH;
        >
        > I sometimes screw thid one by ommiting teh keyword CURRENT when
        > adding schemate to the PATH. (In which case you get a schem named
        > PATH instead of the current path)
        >
        > Cheers
        > Serge[/color]

        The following is also equivalent:

        SET PATH SYSTEM PATH, CURRENT PATH;

        As SYSTEM PATH expands to "SYSIBM", "SYSFUN" according to the DB2 SQL
        Reference (UDB v7 - not sure about others). The default path (according
        to the same documentation) is:

        "SYSIBM", "SYSFUN", "X" where X is the value of the USER special
        register.

        Which would be equivalent to executing:

        SET PATH SYSTEM PATH, USER;

        As USER expands to the content of the USER special register.

        HTH, Dave.

        --
        Dave
        Remove "_nospam" for valid e-mail address

        "Never underestimate the bandwidth of a station wagon full of CDs doing
        a ton down the highway" -- Anon.

        Comment

        • Hunter

          #5
          Re: SQL0440

          It's OK now. I couldn't use these functions because these functions' CREATE
          TIME was later than machine time.(this database was restored from other
          machine)

          Thank you...

          "Hunter" <navyblue88@163 .com> дÈëÓʼþ news:c5d9f1$24j u$1@mail.cn99.c om...[color=blue]
          > Please see my error:
          >
          > [db2inst1@kslnx sqllib]$ db2 "values abs(1)"
          > SQL0440N No authorized routine named "ABS" of type "FUNCTION" having
          > compatible arguments was found. SQLSTATE=42884
          >
          > but I can find this function's defination in SYSCAT.FUNCTION S. How can I
          > do?
          >
          >[/color]


          Comment

          Working...