3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【備忘】bcpコマンドでcsvインポート

Last updated at Posted at 2020-03-30

業務で使うbcpコマンドの備忘。
試験用のデータをcsvファイルでインポートしたい時に、以下のコマンドを叩いた。
(DBはSQL Server)

【コマンド】
$ bcp DB名.スキーマ名.テーブル名 in "CSVファイルパス" -S ホスト名 -U ユーザー名 -P パスワード -t , -c

オプションの意味は
-t ⇒文字列を何で区切るか。上記 -t ,だとカンマ区切り。
-c ⇒ファイルの中身が文字列であることを表す。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?