BCP results

  • Comments posted to this topic are about the item BCP results

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Nice one , thanks

  • I am sorry, but I don't agree 🙂

    I executed the script in SSMS (SQL Server 2012). It returned "10 row(s) affected", the csv file was created, but was empty. If there is any explanation...

  • I did not agree,

    because BCP creates an empty file, even it it reports the error.

    I try to execute in a cmd Shell:

    bcp "SELECT EmployeeName FROM #Employee WHERE UniqueId <= 7" queryout "C:\Exports\data.csv" -c -T

    and bcp created an empty file.

  • Your question is version specific. From SQL Server 2012 the file will be created.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • i have checked it on MSSQL 2012. :crying:

  • This was removed by the editor as SPAM

  • Stewart "Arturius" Campbell (7/28/2014)


    Sean Pearce (7/28/2014)


    Your question is version specific. From SQL Server 2012 the file will be created.

    +1

    All in all, a good question, despite missing the specification regarding SQL Server version...

    My bad - apologies to all affected

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Got it wrong 🙁

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • rhythmk (7/28/2014)


    Got it wrong 🙁

    Same here but it`s because of the bad design of the question.

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Roland C (7/27/2014)


    I am sorry, but I don't agree 🙂

    I executed the script in SSMS (SQL Server 2012). It returned "10 row(s) affected", the csv file was created, but was empty. If there is any explanation...

    The same 10 rows result I got, unfortunately the author didn`t explain that version issue in the question :w00t:

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Stuart Davies (7/28/2014)


    Stewart "Arturius" Campbell (7/28/2014)


    Sean Pearce (7/28/2014)


    Your question is version specific. From SQL Server 2012 the file will be created.

    +1

    All in all, a good question, despite missing the specification regarding SQL Server version...

    My bad - apologies to all affected

    We have a rule here in QoTD, that we are running the latest SQL Server version by default unless other mentioned in the question literally, so we all need our 2 points back man 😉

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Sean Pearce (7/28/2014)


    Your question is version specific. From SQL Server 2012 the file will be created.

    Thanks Sean for providing a much better explanation

    Using 2012, I had empty file

    +1

  • Author should mention the SQL Server version. Agree with all

    Thanks

  • I'm lucky that we're still running 2008. 😛 Thanks for sharing the question.

Viewing 15 posts - 1 through 15 (of 28 total)

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