且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

加入表格所需的帮助

更新时间:2023-02-05 16:26:06

选择a.DoDate,a.DoNumber,a.CusId,b.CompName,b.CompAddress,b.Tel,b.Fax,b.ContPerson ,b.SalesPerson,c.ItemNo,c.Description,c.Qty来自ItemParent一个内部联接CustomerDetail b ON a.CusId = b.CusId内部联接ItemParent c ON c.DoNumber = b.DoNumber"

使用上面的查询,让我知道.....
SELECT a.DoDate,a.DoNumber,a.CusId,b.CompName,b.CompAddress,b.Tel,b.Fax,b.ContPerson,b.SalesPerson,c.ItemNo,c.Description,c.Qty from ItemParent a inner join CustomerDetail b ON a.CusId = b.CusId inner join ItemParent c ON c.DoNumber = b.DoNumber"

Use this above query and let me know.....


请改用此查询:
Use this query instead:
SELECT a.DoDate,
a.DoNumber,
a.CusId,
b.CompName,
b.CompAddress,
b.Tel,b.Fax,
b.ContPerson,
b.SalesPerson,
c.ItemNo,
c.Description,
c.Qty
from ItemParent 
INNER JOIN CustomerDetail b ON a.CusId = b.CusId
INNER JOIN ItemParent c ON b.DoNumber = c.DoNumber


问候,
爱德华


Regards,
Eduard


尝试一下:
try this:
private void BindGridData()
{
  DataTable dt = new DataTable();
  strSql = "SELECT EmpView.EMP_NAME,EmpView.DESIG_NAME, EMP_PUBLICATION.EMPCODE,EMP_PUBLICATION.TITLE, EMP_PUBLICATION.DOWNLOADFILE ,EMP_PUBLICATION.EXT_LINK, EMP_PUBLICATION.ENTRY_DATE "
              + " FROM  EMP_PUBLICATION INNER JOIN "
                      + "EmpView ON EMP_PUBLICATION.EMPCODE = EmpView.EMP_ID ";
  dt = ObjGenFun.execute_dataset("TR", strSql).Tables[0];
  GridShow.DataSource = dt;
  GridShow.DataBind();
}