Wednesday, March 2, 2016

Limitations of BCP command in SQL Server

Though BCP is very popular command option to fetch the data from SQL Server, It has its own limitations.

I trying to list few of them,


  1. Input Query should be mentioned directly in the command line, we can not save the SQL query in external file and execute. This limitation can be serious if you have long and complex query to use.
         However, we can write complex query in stored procedure and execute it from BCP. 
  2.  We cannot use like operator with % wild card character in BCP SQL query. surprisingly we don't get any error for this.
        However, we can overcome this by using %% in place of % character in the query.


Hope this help to decide whether to use BCP or not for your scenario.

Happy Coding :)

No comments:

Post a Comment