Checking the file size

  • I am trying to alter a proc that already checks to see if the file exists.  I am trying to find out how to add checking for the size.  Here is an example of the code.

     

     

    declare @ModDate SmallDateTime,

     @StmtFilename char(17),

     @FileChk int,

      @StmtFiles table (

      [DateMod] [datetime],

      [Stmtfile] [varchar] (29)

    &nbsp

     

     insert into @StmtFiles

     select cast(left(dirstring, 20) as datetime) as DateMod, right(ltrim(rtrim(dirstring)),17) as Stmtfile

     from Admin..tbldirlogfile_nt

     where  isdate(left(dirstring, 10)) = 1

     and  right(ltrim(rtrim(dirstring)),17) not in (

          select StmtFileName

          from tblname

         &nbsp

     select @FileChk = count(*)

     from @StmtFiles

     

  • It would help if you could post the DDL for any table listed in your example as well as some sample data.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply