本文介绍了如何在数据集中合并这些两个查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! SqlCommand SqlComm = new SqlCommand(); SqlComm.Connection = conn; SqlComm.CommandType = CommandType.Text; SqlComm.CommandText = select jobcard_creation.jobcard_no,jobcard_creation.vehicle_no,jobcard_creation.vehicle_model,jobcard_creation.date, jobcard_staff.staff_name, + jobcard_creation.delivery_date,jobcard_creation.total_days,vehicle_type.vehicle_name ,来自jobcard_creation的Job_type.jobtype_name + 在jobcard_creation.department_id上左外连接vehicle_type = vehicle_type.vehicle_id在job_type.jobtype_id = jobcard_creation.job_type + 的左外连接Job_type job join_ jobaff_staff在jobcard_staff.jobcard_id = jobcard_creation.jobcard_id,其中 + jobcard_creation.jobcard_id =' + txtJobCardId.Text + '和jobcard_creation.type ='N'和jobcard_staff.type ='N'; SqlCommand sqlcom1 = new SqlCommand(); sqlcom1.Connection = conn; sqlcom1.CommandType = CommandType.Text; sqlcom1.CommandText = 从jobcard_work_description中选择描述,其中jobcard_id =' + txtJobCardId.Text + '; // 创建Northwind DataSetXSD实例 解决方案 SqlCommand SqlComm = new SqlCommand();SqlComm.Connection = conn;SqlComm.CommandType = CommandType.Text;SqlComm.CommandText = "select jobcard_creation.jobcard_no,jobcard_creation.vehicle_no,jobcard_creation.vehicle_model,jobcard_creation.date, jobcard_staff.staff_name, " + " jobcard_creation.delivery_date,jobcard_creation.total_days,vehicle_type.vehicle_name,Job_type.jobtype_name from jobcard_creation " + " left outer join vehicle_type on jobcard_creation.department_id=vehicle_type.vehicle_id left outer join Job_type on job_type.jobtype_id=jobcard_creation.job_type " + " left join jobcard_staff on jobcard_staff.jobcard_id=jobcard_creation.jobcard_id where " + " jobcard_creation.jobcard_id='" + txtJobCardId.Text + "' and jobcard_creation.type='N' and jobcard_staff.type='N' ";SqlCommand sqlcom1 = new SqlCommand();sqlcom1.Connection = conn;sqlcom1.CommandType = CommandType.Text;sqlcom1.CommandText="select describtion from jobcard_work_description where jobcard_id='" + txtJobCardId.Text + "' ";// Create instance of Northwind DataSetXSD 解决方案 这篇关于如何在数据集中合并这些两个查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-06 07:01