sql - How to insert csv file to postgresql using jmeter
问题描述
i'm trying to insert CSV data file to POSTGRESQL from JMETER using "LOAD DATA" statement. But LOAD DATA statement won't working. On the internet load statement becoming highlighted and working but on my machine its not becoming highlighted and getting error on it.
Here is my SQL query:
"LOAD DATA INFILE '/Desktop/Summary/oca_sum.csv' INTO TABLE Load FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' "
And error is:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "DATA" Position: 6
Thanks.
解决方案
You are trying to run a MySQL command against a PostgreSQL database.
PostgreSQL uses a different syntax for accomplishing the same task.
推荐阅读
- angular - 从离子选择中删除离子无线电 - Ionic v4
- android - 来自 API 的数据解析循环,结果错误
- java - Hibernate / JPA:如何通过相同的参数将两个@Immutable实体(同一张表的视图)与另一个实体映射
- html - 如何真正禁用符号的表情符号
- asp.net-mvc - 使用通配符重写 IIS URL
- javascript - 使用 javascript 对数据库进行用户输入验证
- associations - 在 rapidminner 中用于 FP-Growth 挖掘的数据标准是什么?
- php - WordPress 不断按类别过滤
- java - Spring Integration RecursiveDirectoryScanner 给出太多文件打开异常
- postgresql - PostgreSQL 相同数据类型的不同索引创建时间