【问题标题】:run and execute text file using sqlite 3 command line使用 sqlite 3 命令行运行和执行文本文件
【发布时间】:2014-01-16 19:48:12
【问题描述】:

我有一个文本文件,其中包含一个 sqlite 语句,我想将其转储为 .sql 格式但无法执行。任何帮助,将不胜感激。我的文件作为verbali.txt存储在桌面上,当我进入命令提示符和特定的sqlite文件夹并运行它时,只需打开文本文件。

.mode insert 
.header on
.out file.sql 
select select Id   ,CompanyId  ,DateTime  ,Serial  ,DeviceId  ,AgentAId  ,GpsAddress  ,Targa  ,CommonRoadDescription  ,RoadCivicNumber  ,VehicleBrandDescription  ,VehicleModelDescription  ,VerbaliVehicleTypeDescription  ,CommonColorVehicleDescription  ,VerbaliRuleOneCode  ,VerbaliRuleOneDescription  ,VerbaliRuleOnePoints  ,VerbaliClosedNoteDescription  ,Points  ,VerbaliMissedNotificationDescription  ,MissedNotificationNote  ,StatementNote  from VerbaliData

【问题讨论】:

    标签: sqlite


    【解决方案1】:

    在命令提示符下将文件通过管道传输到 sqlite3:

    sqlite3 yourdatabase.db <path\to\verbali.txt
    

    其中sqlite3sqlite3.exe 命令行工具。

    【讨论】:

    • 你能告诉我哪里出错了。 C:\programfiles\sqlite Expert\personal 3> sqliteexpertpers.exe 然后在右边输入下面的 webmobility.db
    • 当我尝试在数据库之后运行你的命令时,它再次打开 sqlite 数据库我找不到文件
    • 是否可以从 sqlite 命令提示符创建一个 sql 文件。
    猜你喜欢
    • 1970-01-01
    • 2013-02-04
    • 2015-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-24
    • 2022-12-17
    相关资源
    最近更新 更多