Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Location
    FRANCE (Paris)
    Posts
    23

    Exclamation Unanswered: Big Pb with ALTER TABLE <...> DROP <...>

    Hi,

    We have bigs pb with this command (ASE 12.5) :

    ALTER TABLE <Table name> DROP <Column name>

    After the execution, when we want to execute a stored procedure who use the table modified we have Erreur msg like's :

    This columns does no allow NULL values or
    Column name appears more than once in the result column list.

    Have you already made this test ? :

    create table test (a1 int null, a2 char(5) null, a3 char(5) not null)

    insert into test values (1,'11111','11111')
    insert into test values (2,'11111','11111')
    insert into test values (3,'11111','11111')
    insert into test values (4,'11111','11111')

    create procedure proc_test
    as
    begin
    insert into test values (5,'22222','22222')
    end

    alter table test drop a2

    sp_recompile test

    exec proc_test

    log :

    Server Message: Number 264, Severity 16
    Server 'FRDEV', Procedure 'proc_test', Line 4:
    Column name appears more than once in the result column list.
    (return status = -6)

    the same pb with an UDPATE

    The sp_recompile command and the solution proposed by Sybase :

    " Command line trace flag -T7706 should be used to force automatic regneration of stored procedures from syscomments text instead of simple renormalization "

    only correcting the pb with UPDATE.
    This pb exist's in ASE 12.5.1

    Have you already identified this pb ?

  2. #2
    Join Date
    Dec 2003
    Location
    FRANCE (Paris)
    Posts
    23

    Correction

    Sorry, use this procedure in test :

    create procedure proc_test
    as
    begin
    insert into test values (5,'22222')
    end

    thx,

Posting Permissions

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