sql - 错误: array value must start with "{" or dimension information LINE 1

标签 sql arrays postgresql sql-insert

当我运行代码时,它向我显示此错误。

A Database Error Occurred

Error Number:

ERROR: array value must start with "{" or dimension information LINE 1: ...0232882', 'Kathmandu', 'Baneshwor', '2016-06-08', '13:00', '... ^

INSERT INTO "report" ("ukey", "district", "police_station", "event_date", "event_time", "accident_severity", "hit_and_run", "report_recorded_timestamp", "no_vechiles_involved", "no_of_driver_casualty", "no_of_passenger_casualty", "no_of_pedestrian_casualty") VALUES ('57567b4729356260232882', 'Kathmandu', 'Baneshwor', '2016-06-08', '13:00', '3', 'false', '2016-06-07 09:44:26', '1', '1', '0', '0')

Filename: C:\wamp\www\nrcds\system\database\DB_driver.php

Line Number: 330

我不知道出了什么问题。请指导我。提前致谢

最佳答案

其中一列是一个数组。在列周围添加 {}

INSERT INTO "report" (yourarraycolumn) VALUES ('{value}')

关于sql - 错误: array value must start with "{" or dimension information LINE 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37673498/

相关文章:

mysql - SQL 查询问题 : Cannot get desired output

php - Laravel 4 无法多次使用 ->on( ) 加入多个条件

java - 比较字符串数组的数组列表

c - 如何将结构与二维数组和动态内存分配一起使用

ruby-on-rails - rake 数据库 :create using PostgreSQL ---- fe_sendauth: no password supplied

sql - postgresql json聚合

php - 如何通过单击按钮删除某些表格行

java - 最快的数组比较

Java & Spring,保留用户定义的过滤器

postgresql - Postgres 文本数据类型截断问题