列中的错误 - Postgres(psycopg2.ProgrammingError:列" sales_ind"类型为整数但表达式的字符类型不同)

时间:2018-05-07 07:53:10

标签: sql postgresql amazon-redshift

尝试在Postgres中执行以下查询时出现以下错误。

my_df <- structure(list(document = c(1L, 1L, 1L, 2L, 2L, 2L), 
                        topic = c(1L, 2L, 3L, 1L, 2L, 3L), 
                        gamma = c(0.932581726, 0.015250915, 0.009929329, 
                                  0.032864538, 0.012939786, 0.13281681)), 
                   class = "data.frame", row.names = c(NA, -6L))

此列具有以下case语句的输出:

psycopg2.ProgrammingError: column "sales_ind" is of type integer but expression is of type character varying

HINT:  You will need to rewrite or cast the expression.

Column name : sales_ind
Data_type : int

任何人都可以提供帮助。感谢..

0 个答案:

没有答案