sql - 使用 SQL 将数据插入 Excel 文件
问题描述
我使用 SQL 语句在 excel 中插入一些日期。但有错误。
我试过了
INSERT INTO Sheet1$ (Contribution Month, Serial, Name, Contributions Type, Amount, Status)
VALUES (01/09/2018, 353660, BRUIN NOEL, Employer, -694.58, open)
INSERT INTO Sheet1 (Contribution Month, Serial, Name, Contributions Type, Amount, Status)
VALUES (01/09/2018, 353660, BRUIN NOEL, Employer, -694.58, open)
INSERT INTO Sheet1$ (Contribution Month, Serial, Name, Contributions Type, Amount, Status)
VALUES ('01/09/2018', '353660', 'BRUIN NOEL', 'Employer', '-694.58', 'open')
INSERT INTO Sheet1 (Contribution Month, Serial, Name, Contributions Type, Amount, Status)
VALUES ('01/09/2018', '353660', 'BRUIN NOEL', 'Employer', '-694.58', 'open')
有什么更正吗?
解决方案
试试下面的代码:
INSERT INTO [Sheet1$] ([Contribution Month], [Serial], [Name], [Contributions Type], [Amount], [Status])
VALUES ('01/09/2018', 353660, 'BRUIN NOEL', 'Employer', -694.58, 'open')
缺少一些字符。对于工作表名称[]
、字段名称[]
及其''
字符串值。
推荐阅读
- r-markdown - Kable 无法正确显示表格
- go - Couchbase GO SDK 不区分大小写
- azure-logic-apps - 如何使用 Azure 表存储 - 通过逻辑应用插入具有动态内容的实体
- css - SVG 上的 CSS 变换原点始终 (0,0)
- ansible - Jinja 匹配字符串与列表中的第一项
- javascript - 如何将函数输出传递到函数体之外?
- java - 通过单击 Firebase 数据库中的按钮过滤 ListView
- oracle - 是否可以在 Oracle 表单库中使用系统变量?
- html - 使用来自的东西
- c# - Docusign 选项卡不会出现在已发送的文档上