Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

Surprising behaviour with BCP -q

I would expect the -q option to BCP to cause BCP running with the option QUOTED_IDENTIFIERS ON and that's that. However, testing shows that it does more: in "in", "out" and "format" modes also parses the name and puts each component in brackets. I don't think this is a very good behaviour. For instance if you have a table named [a.b] and it has a filtered index, you cannot load this table without -q because of the index and you cannot load it with -q, because the name is never parsed correctly. So I am inclined to call this a bug. Then again, I realise that this functionality was not put there by mistake.

But unless you decide to remove this behaviour, you need to update Books Online to explain this better. The current text in Books Online is not very clear. That is, once you know the behaviour you can read it between the lines, but if you don't know and don't expect it (and why would you?), you can never guess it

4 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Erland Sommarskog shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base