Postgresql 使用orange3-POSTGRES时出现不明确的列错误
在内部执行查询时,我得到一个不明确的列错误 查询Postgresql 使用orange3-POSTGRES时出现不明确的列错误,postgresql,orange,Postgresql,Orange,在内部执行查询时,我得到一个不明确的列错误 查询 SELECT CAST(REPLACE(memoria_em_uso, 'G','') AS FLOAT), CAST(REPLACE(memoria_total, 'G','') as FLOAT), CAST(REPLACE(memoria_livre, 'M','') as FLOAT) FROM tbl_memoria_hosts 输出 Error encountered in widget SQL Ta
SELECT CAST(REPLACE(memoria_em_uso, 'G','') AS FLOAT),
CAST(REPLACE(memoria_total, 'G','') as FLOAT),
CAST(REPLACE(memoria_livre, 'M','') as FLOAT)
FROM tbl_memoria_hosts
输出
Error encountered in widget SQL Table:
Traceback (most recent call last):
File "/home/luis/anaconda3/lib/python3.7/site-packages/Orange/data/sql/backend/postgres.py", line 81, in execute_sql_query
cur.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "replace" is ambiguous
LINHA 1: SELECT (("replace")::double precision) AS "replace", (("repl...
注意:
表中的所有列都是VARCHAR,其中的信息编写如下
7.7G
这个橙色的东西似乎重写了查询。尝试显式提供列别名:例如,CAST(REPLACE(memoria_-em-u-u-u-u-u-u,'g','')作为memoria-u-em-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u-u作为FLOAT…不,不要把它放在FROM子句中:从tbl\u memoria\u主机中选择CAST(替换(memoria\u em\u uso,'G','')作为FLOAT,CAST(替换(memoria\u total,'G','')作为memoria\u total,…