{"id":14743,"date":"2025-03-14T08:29:06","date_gmt":"2025-03-14T08:29:06","guid":{"rendered":"http:\/\/www.withdata.com\/blog\/?p=14743"},"modified":"2025-03-14T09:29:06","modified_gmt":"2025-03-14T09:29:06","slug":"update-oracle-table-through-csv-via-command-line-on-macos","status":"publish","type":"post","link":"https:\/\/www.withdata.com\/blog\/ora-cmd\/update-oracle-table-through-csv-via-command-line-on-macos.html","title":{"rendered":"Update Oracle table through CSV via command line on MacOS"},"content":{"rendered":"<p>Want to import  <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comma-separated_values\">CSV<\/a>  to update rows in  <a href=\"https:\/\/www.oracle.com\/database\/\">Oracle<\/a>  table via command line on MacOS?<\/p>\n<p>Using <a href=\"https:\/\/www.withdata.com\/ora-cmd\/\">ora-cmd<\/a>, a Command-Line client for Oracle, you can import CSV\/TSV\/TXT data to update existing Oracle  table easily and fast.<\/p>\n<p>Support Windows, Linux, and MacOS.<\/p>\n<p><a href=\"#download-top\" onclick=\"dtv.style.display = 'block';\">Download ora-cmd MacOS version<\/a>  <a href=\"#download-top\" onclick=\"dtv.style.display = 'block';\"><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/download_3.jpg\" alt=\"Download ora-cmd\" width=\"80\" height=\"22\" style=\"max-width:100%;height:auto;\" \/><\/a> <span id=\"dtv\" style=\"display: none;\"><br \/>\n<a href=\"\/down\/ora-cmd.darwin-amd64.zip\">ora-cmd.darwin-amd64.zip<\/a><br \/>\n<a href=\"\/down\/ora-cmd.darwin-arm64.zip\">ora-cmd.darwin-arm64.zip<\/a><br \/>\n<\/span><\/p>\n<p>No need to install Oracle client library.<\/p>\n<p>Convenient to deploy to cloud. No need to run installation file, just uncompress and run, immediately.<\/p>\n<h2>Update Oracle  table through CSV\/TSV\/TXT file via command line on MacOS<\/h2>\n<p>1. In interactive mode:<\/p>\n<pre>\nora-cmd> load loadtype=update\n      > updatekey=id\n      > table=media_messages \n      > datafile=\/Users\/pan\/Documents\/media_messages.csv \n      > delimiter=, \n      > quote=\" \n      > header=y;\n<\/pre>\n<p>2. In batch mode:<\/p>\n<pre>\nora-cmd dsn=\"pan:withdata@192.168.0.102\/test\" task=load loadtype=update updatekey=id table=media_messages datafile=\/Users\/pan\/Documents\/media_messages.csv delimiter=, quote=\" header=y quit=y\n<\/pre>\n<p>&#8220;loadtype=update&#8221; will update row in table by &#8220;updatekey&#8221; id, not insert.<\/p>\n<p>See <a href=\"https:\/\/www.withdata.com\/ora-cmd\/load.html\">parameters detail<\/a>.<\/p>\n<hr style=\"clear: both;\" \/>\n<p><a href=\"https:\/\/www.withdata.com\/ora-cmd\/\">More about ora-cmd<\/a> &#8211; <a href=\"https:\/\/www.withdata.com\/ora-cmd\/\">Command-Line client for Oracle<\/a><\/p>\n<div id=\"download-bottom\" style=\"clear: both;\">\n<p>Download ora-cmd MacOS version<a href=\"#download-bottom\" onclick=\"dbv.style.display = 'block';\"><img decoding=\"async\" src=\"https:\/\/www.withdata.com\/images\/btn_download_green.png\" alt=\"Download ora-cmd\" width=\"165\" height=\"50\" style=\"max-width:100%;height:auto;\" \/><\/a> <span id=\"dbv\" style=\"display: none;\"><br \/>\n<a href=\"\/down\/ora-cmd.darwin-amd64.zip\">ora-cmd.darwin-amd64.zip<\/a><br \/>\n<a href=\"\/down\/ora-cmd.darwin-arm64.zip\">ora-cmd.darwin-arm64.zip<\/a><br \/>\n<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Want to import CSV to update rows in Oracle table via command line on MacOS? Using ora-cmd, a Command-Line client for Oracle, you can import CSV\/TSV\/TXT data to update existing Oracle table easily and fast. Support Windows, Linux, and MacOS. Download ora-cmd MacOS version ora-cmd.darwin-amd64.zip ora-cmd.darwin-arm64.zip No need to install Oracle client library. Convenient to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3146],"tags":[73,34,2554,1325,3148,2561],"class_list":["post-14743","post","type-post","status-publish","format-standard","hentry","category-ora-cmd","tag-command-line","tag-csv","tag-macos","tag-oracle","tag-oracle-update-csv","tag-update"],"_links":{"self":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/14743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/comments?post=14743"}],"version-history":[{"count":3,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/14743\/revisions"}],"predecessor-version":[{"id":27312,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/posts\/14743\/revisions\/27312"}],"wp:attachment":[{"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/media?parent=14743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/categories?post=14743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.withdata.com\/blog\/wp-json\/wp\/v2\/tags?post=14743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}