Potential Problem Areas With select *

The result of a select * clause in a stored procedure, trigger, or view that was created in a version of Adaptive Server earlier than 11.9.3 may be different from what you expect.

If dbcc upgrade_object finds a select * clause in the outermost query block of a stored procedure, it returns an error, and does not upgrade the object.

For example, consider these stored procedures:
create procedure myproc as
  select * from employees
go
create procedure yourproc as
  if exists (select * from employees)
    print "Found one!"
go

dbcc upgrade_object returns an error on myproc because myproc includes a statement with a select * clause in the outermost query block. This procedure is not upgraded.

dbcc upgrade_object does not return an error on yourproc because the select * clause occurs in a subquery. This procedure is upgraded.

For more information about dbcc upgrade_ojbect, see dbcc in Reference Manual: Commands.