Queryout select statements to outputfiles with proper datestamp

  • Hello,

    I have few complex queries and I want to extract the output of results to all different dateformatted output files.

    Can you guide how to write the queries?

    I know BCP is a solution but any other effective way to implement it?

    Thanks.

  • Take a close look at the CONVERT function in Books Online (aka BOL). It can handle most date formats, and if you have to, you can always use the YEAR(), MONTH(), and DAY() functions, and/or the various uses of DATEPART(), or DATENAME(), together with CAST to varchar to get what you need.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • It worked.

    Thanks.

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

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