DISTINCT问题

az2k 2004-11-26 10:35:32
在一个查询多个表和列的语句中,怎么用DISTINCT?
select nOrderId,sClientName,sPrjName,nPreContractFinance,sRecvAddress,sReceiverName,dtOrderDate,tNodes.sName as nodename,tMessageStatus.sName as MsgName from tOrderi,tNodeAccessUserConfig,tNodes,tMessageStatus where tNodeAccessUserConfig.nOrigNodeId=tOrderi.nOrigiatedNodeId and tNodeAccessUserConfig.sUserName='"&sname&"' and tOrderi.nstatusId=tMessageStatus.nId order by dtOrderDate desc
...全文
61 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
good2speed 2004-11-26
select nOrderId,sClientName,sPrjName,nPreContractFinance,sRecvAddress,sReceiverName,dtOrderDate,tNodes.sName as nodename,tMessageStatus.sName as MsgName from tOrderi,tNodeAccessUserConfig,tNodes,tMessageStatus where tNodeAccessUserConfig.nOrigNodeId=tOrderi.nOrigiatedNodeId and tNodeAccessUserConfig.sUserName='"&sname&"' and tOrderi.nstatusId=tMessageStatus.nId
GROUP BY nOrderId,sClientName,sPrjName,nPreContractFinance,sRecvAddress,sReceiverName,dtOrderDate,tNodes.sName,tMessageStatus.sName
order by dtOrderDate desc
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-11-26 10:35
社区公告
暂无公告