       1
  _1sp_%_MAX%ID

 

Create procedure _1sp__1SJOURN_MaxID(@id CHAR(9) OUTPUT) AS
set nocount on select @id=MAX(IDDOC) from _1SJOURN(NOLOCK) if @id is null select @id='         '

     _1SJOURN    IDDOC.
       9 .

       ISNULL

Create procedure _1sp__1SJOURN_MaxID(@id CHAR(9) OUTPUT) AS
set nocount on select @id=ISNULL(MAX(IDDOC), '         ')  from _1SJOURN(NOLOCK)

    ( )       .
 if @id is null select @id='         '   


           if @id is null select @id='         '
           1    - xp
   (     xp )

     xp    _1sp_%_MAX%ID
        
if @id is null select @id='         '
 
--IF @ID IS NULL select @id='         '

..     
Create procedure _1sp__1SJOURN_MaxID(@id CHAR(9) OUTPUT) AS
set nocount on select @id=MAX(IDDOC) from _1SJOURN(NOLOCK) --IF @ID IS NULL select @id='         '

          

       (MaxID  MaxRowID   )
         1     t-sql 
   .     1SUIDCTL
        ,      .

  sql    164   164 ..       .
        2-3.
   .  xp      .
  -      ,      .

         xp      
    .


    .
