本文介绍了如何获得比较价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! TblChatMaster --------------------- ChatId CreatedDate 4 15/05/2013 5 16/05/2013 TblChatDesc ------------------- --- id ChatId ReceiverId 1 4 2 2 4 3 3 5 2 TblMessageMaster - -------------------------------- id ChatId MsgText MessengerId 14'H嗨'1 2 5'Hello'1 我有ReceiverId和MessengerId。 我们有, MessengerId = 1 ReceiverId = 2,3 现在我想得到那个ChatId其中messengerId = 1且ReceiverId = 2& 3 通过以上结论,chatId应该是4 -----我正在按照以下方式行事,但它不起作用 选择 cm.ChatId 来自 TblChatMaster cm join TblChatDesc cd on cm.ChatId = cd.ChatId join TblMessageMaster mm cm.ChatId = mm.ChatId 其中​​ ReceiverId (选择 * 来自 dbo.Split (' 2,3'))和 MessengerId = 1 解决方案 TblChatMaster---------------------ChatId CreatedDate 4 15/05/2013 5 16/05/2013 TblChatDesc----------------------id ChatId ReceiverId 1 4 2 2 4 3 3 5 2 TblMessageMaster--------------------------------- id ChatId MsgText MessengerId 1 4 'Hi' 1 2 5 'Hello' 1I have ReceiverId and MessengerId.Let we have,MessengerId = 1ReceiverId = 2,3Now I want to get that ChatId which have messengerId=1 and ReceiverId=2 & 3By above conclusion chatId should be 4-----I am doing following way but it is not workselect cm.ChatId from TblChatMaster cm join TblChatDesc cd on cm.ChatId=cd.ChatId join TblMessageMaster mm on cm.ChatId=mm.ChatId where ReceiverId in(select * from dbo.Split('2,3')) and MessengerId=1 解决方案 这篇关于如何获得比较价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS!
05-21 15:08