日期:2014-05-17  浏览次数:20457 次

一个sql查询
SQL code
SELECT distinct TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName 

这样可以
SQL code
SELECT top 3 distinct TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName 

这样就出错,只加了个top 3
关键字 'distinct' 附近有语法错误。

------解决方案--------------------
SQL code
SELECT distinct top 3  TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName

------解决方案--------------------

来晚了

------解决方案--------------------
探讨

SQL code
SELECT distinct top 3 TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName

------解决方案--------------------
SELECT distinct top 3 TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName 


------解决方案--------------------
探讨
引用:

SQL code
SELECT distinct top 3 TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName


+

------解决方案--------------------
探讨
SQL code
SELECT distinct top 3 TagName,AssesTypeID FROM KPI_PerformanceEvalua order by TagName

------解决方案--------------------
这没办法的事,你要么改,要么再写一个
'SELECT distinct TOP '+@TotalRecordForPageIndex+' '+@ReturnFields+'
FROM '+@TableName+' '+@Where


------解决方案--------------------
SQL code

'SELECT DISTINCT TOP '+@TotalRecordForPageIndex+' '+@ReturnFields+'
            FROM '+@TableName+' '+@Where

------解决方案--------------------
已经差不多了,过来混点分哈
------解决方案--------------------
尼玛 就没希望拿分了