create files with bcp

  • Hi,

    I have a table that have rows. With it must create various files in txt. How can i create various files with a unique instruction? is it possible?

    E.g:

    Table1

    id name

    1 books

    1 pen

    1 pencil

    2 coat

    2 shoes

    2 short

    3 mary

    3 george

    4 france

    4 spain

    4 england

    The files:

    File1 File2 File3 File4

    books coat mary france

    pen shoes george spain

    pencil short england

    Thanks

  • bcp "SELECT id, name FROM table1 WHERE name="Books"" queryout C:\FILE1.txt -c -Sservername -Usa -Ppassword

    Alex S
  • Thanks, but i want create all files in a unique instruction. How can i do it?????

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

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