Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    South Africa
    Posts
    71

    Unanswered: BCP results in 3 rows

    Good Day

    I want to know if bcp can do this for me,(I get my results nicely from fetch statement) lets say I do this
    Select Fileid, FileNo, VersionNo, Fieldname, Fileid from TableA
    and my results are

    1 80 6.0 34

    I want my text file that I will use bcp to recreate to be like in this format
    VersonNo
    Fileid
    Select Fileid, FileNo, VersionNo, Fieldname, Fileid from TableA

    6.0
    34
    1 80 6.0 34

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to the books online for BCP Format file option to get the task.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to the books online for BCP Format file option to get the task.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •