sap-iq - 可以在没有列列表的情况下使用 LOAD TABLE 吗?

标签 sap-iq

我习惯使用 Sybase ASE 使用 bcp 命令行工具卸载和加载数据。这不需要您指定任何列名称。

我知道 Sybase IQ 中与 bcp 等效的是 LOAD TABLE 命令,但是如果不指定列名称,我无法加载任何数据。

datafile.txt:
1,2,3,
1,2,3,

CREATE TABLE myTable (
   fa integer null,
   fb integer null,
   fc integer null
)

LOAD TABLE myTable
FROM 'datafile.txt'
QUOTES OFF 
ESCAPES OFF 

以上产生以下错误;

The LOAD statement's column count(0) must be between 1 and 0.  Check the LOAD statement's 'load-specification'

我见过一些没有列列表的 LOAD TABLE 命令的示例,但我无法让它工作。只能用二进制文件吗?我也尝试过使用 FORMAT BCP,但没有成功。

列名是必须的,这似乎很疯狂。

最佳答案

在 IQ 上,LOAD 语句需要一个列列表。例如。来自15.3 documentation :

The LOAD TABLE command must contain at least one column that needs to be loaded from the file specified in the LOAD TABLE command. Otherwise, an error is reported and the load is not performed.

关于sap-iq - 可以在没有列列表的情况下使用 LOAD TABLE 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57555294/

相关文章:

sql - T-SQL "<tablename> is not accessible in this context"是什么意思? (SQL 代码 : 1001042)

java - 如何在不使用任何工具的情况下导出 SYBASE IQ/SYBASE ASE 中所有对象(如表、索引等)的 ddl?

python - 客户端使用 Python3 连接到 sybase IQ

python - Python 中的 Sybase IQ 连接

odbc - 错误 [IM002] [Microsoft][ODBC 驱动程序管理器] 未找到数据源名称并且未从 Window 服务指定默认驱动程序

java - Sybase IQ 的批量复制实用程序

java - 如何从使用 Java 的客户端在 Sybase IQ 中加载表?

java - PreparedStatement 不适用于 Java 中的 Sybase IQ

sql-server - 这些表对于 SQL Server 或 Oracle 来说太大了吗?