Sorry i think there is a typo (the " should not be exist) in my earlier post. Pls read below for further info:
This command works perfectly :-
EXEC xp_cmdshell 'bcp History.dbo.InventoryValuation_FP102008 out D:\test.txt -q -T -c'
But, if i renamed the database from "History" to "History Data" and ran this command :-
EXEC xp_cmdshell 'bcp [History Data].dbo.InventoryValuation_FP102008 out D:\test.txt -q -T -c'
It returned this error msg:
Copy direction must be either 'in', 'out' or 'format'.
Thanks!