|
contribs<-dbGetQuery(myconn,
paste("select user_name, page_id
from contribs_test
where rev_timestamp<'",time.period[i+1],"'
and user_name in (",user[,1],")"))
目的:红字标识的user[,1]是从另一个表中选择的姓名这个属性(有3个值)
>user
rev_user_text
1 Ortolan88
2 Zoe
3 24.27.58.16
> user[,1]
[1] "Ortolan88" "Zoe" "24.27.58.16"
想在contribs_test 中查询和user[,1]匹配的相关记录,用in怎么试都不对
请问这种sql语句该怎么写?感谢~
|
|