本文介绍了三列数据frm,一个表作为单列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将一个表中的三列数据显示为单列?
How to display three columns data from one table as single column ?
Select ACODE as ID, PARTY_NAME as [NAME] from Tblmst_Party left outer join TblTrn_Purch_Enquiry a on Tblmst_Party.ACODE = a.PARTY_CODE1 left outer join TblTrn_Purch_Enquiry b on b.PARTY_CODE2 = tblmst_Party.ACODE left outer join TblTrn_Purch_Enquiry c on c.PARTY_CODE3 = tblmst_Party.ACODE where c.ENQNO =16
这出了问题,请给我提出任何建议.
this is going wrong please suggest me any idea.
推荐答案
Select ACODE+PARTY_NAME as [ID and NAME] from Tblmst_Party left outer join TblTrn_Purch_Enquiry a on Tblmst_Party.ACODE = a.PARTY_CODE1 left outer join TblTrn_Purch_Enquiry b on b.PARTY_CODE2 = tblmst_Party.ACODE left outer join TblTrn_Purch_Enquiry c on c.PARTY_CODE3 = tblmst_Party.ACODE where c.ENQNO =16
select Cast(ID as varchar(20))+Cast(ENQNO as varchar(20))+PARTY_NAME as Name from YourTableName
这篇关于三列数据frm,一个表作为单列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!