简体   繁体   English

Win7上Aginity工作台在IBM netezza SQL数据库上执行SQL查询时出错

[英]Error of SQL query on IBM netezza SQL database from Aginity workbench on Win7

I need to so a sql query on IBM netezza sql database from Aginity workbench on win7. 我需要从win7上的Aginity工作台在IBM netezza sql数据库上执行sql查询。

My query: 我的查询:

 SELECT *
 from table1 AS c , 
      table2 AS  b
where  CAST(c.id as int) = b.id

in table1, id is character varying(20) and in table2, id is int. 在表1中,id是可变字符(20),在表2中,id是整数。

Table1: 

 id    value1        value2
'985'  'casdqwdc'   '654.3184'  // they are all char

Table2: 

id    value1        
985   694381   // id is int, value1 is int

I got error: 我收到错误消息:

  ERROR [HY000] ERROR:  pg_atoi: error in "id": can't parse "id"

Any help would be appreciated. 任何帮助,将不胜感激。

Somewhere in column ID in table1 there is a value that can't be converted to an integer. 在table1的列ID的某处,有一个值不能转换为整数。

Based on the error, you have probably used nzload or an external table to load a data file that has a header row with column labels without skipping that row, and you have 1 row with the value 'ID' in the column ID. 基于该错误,您可能已使用nzload或外部表加载了具有标题列且带有列标签的数据文件,而没有跳过该行,并且您有1行的列ID中的值为“ ID”。

TESTDB.ADMIN(ADMIN)=> select CAST('ID' as int);
ERROR:  pg_atoi: error in "ID": can't parse "ID"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在win 7上从Aginity工作台找到IBM netezza sql数据库上的表大小 - find the table size on IBM netezza sql database from Aginity workbench on win 7 在win 7的IBM netezza Aginity工作台中查找数据库大小的错误 - error of finding size of database in IBM netezza Aginity workbench on win 7 将SQL数据库从一台服务器复制到IBM netezza Aginity工作台上的另一台服务器 - copy a SQL database from one server to another server on IBM netezza Aginity workbench 如何从Aginity工作台检查在IBM Netezza SQL中创建表的数据和时间 - How to check the data and time that a table was created in IBM Netezza SQL from Aginity workbench 如果从Aginity工作台将47G数据文件导入到IBM netezza数据库,则会发生错误 - error if importing a 47G data file to IBM netezza database from Aginity workbench 在IBM netezza aginity工作台中更改表名的错误 - error of changing a tablename in IBM netezza aginity workbench 在Win 7上从IBM netezza数据库导出sql数据表到txt文件的错误 - error of exporting a sql data table from IBM netezza database to a txt file on win 7 将数据从txt文件导入IBM netezza SQL数据库时出错 - error of importing data from txt file to IBM netezza SQL database 将CSV文件中的数据导入IBM Netezza SQL数据库时出错 - error of importing data from csv file to IBM netezza sql database 在IBM betezza aginity sql数据库工作台中导出大表时如何添加列名 - how to add column names when exporting a large table in IBM betezza aginity sql database workbench
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM