0

我正在使用 RSQLite 来组合两个表。我检查了每一步,但仍然没有弄清楚出了什么问题。这是我的脚本:

ol5_H3K4me1_mesc_common<-dbGetQuery(con,"select* from H3K4me1_mesc where H3K4me1_mesc.V2=H3K4me1_mesc_common.V2 and H3K4me1_mesc.V3=H3K4me1_mesc_common.V3")
Error in sqliteSendQuery(con, statement, bind.data) : 
  error in statement: no such column: H3K4me1_mesc_common.V2
> dbListFields(con,"H3K4me1_mesc_common")
[1] "V1" "V2" "V3"
4

1 回答 1

0

在您发布的查询表H3K4me1_mesc_common中不是FROM子句的一部分,错误也是如此。您希望您的查询如下所示,t1并且t2是各个表的表别名

select t1.* from H3K4me1_mesc t1 
join H3K4me1_mesc_common t2
on t1.V2 = t2.V2 
and t1.V3 = t2.V3
于 2014-11-11T19:53:58.287 回答