That is because everything after search is assumed to be part of the search expression, whereas when you use --search it has to consume only a *single* argument, which is why you have to enclose the entire search expression in quotes.
I have no idea if this works in cmd.exe, but in most modern shells you can simply do this:
calibredb export `calibredb search whatever`
|