[英]LEFT OUTER JOIN problems
I have a error I relay cant understand, if some one could explain to me the problem as its preventing me from progressing with my program. 我有一个我无法理解的错误,如果有人可以向我解释这个问题,因为它阻止了我的程序前进。
the error is saying i have a syntax error on the JOIN 错误是说我在联接上有语法错误
Code 码
using (OleDbDataAdapter query_prof = new OleDbDataAdapter("SELECT aspnet_Users.AplicationId, aspnet_User.UserName, aspnet_User.LastActivityDate FROM (aspnet_Users LEFT OUTER JOIN UserProfile ON aspnet_User.UserName = UserProfile.UserName) WHERE (UserProfile.UserName IS NULL)", conn))
{
query_prof.Fill(dt);
}
Leave out the parenthesis from the from clauses: 在from子句中省略括号:
FROM (aspnet_Users LEFT OUTER JOIN UserProfile ON aspnet_User.UserName = UserProfile.UserName)
you should do : 你应该做 :
FROM aspnet_Users LEFT OUTER JOIN UserProfile ON aspnet_User.UserName = UserProfile.UserName
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.