Stored procedure to archive data in a table into csv file

  • Silly Me!!!

    DECLARE @FileName varchar(50), is the culprit..

    I increased the size @FileName varchar(250), and it's resolved!

  • Annee (3/13/2012)


    Silly Me!!!

    DECLARE @FileName varchar(50), is the culprit..

    I increased the size @FileName varchar(250), and it's resolved!

    hehe 😀

    _________________________________
    seth delconte
    http://sqlkeys.com

  • Your change to use DATEDIFF function will make your qury miss the index on adddatetime.

  • You may want to change your where caluse to this:

    ...

    where adddatetime >= dateadd(dd, datediff(dd, 0, getdate()), 0) and adddatetime < dateadd(dd, datediff(dd, 0, getdate()) + 1 , 0)

  • thanks for that input!

Viewing 5 posts - 16 through 19 (of 19 total)

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