在SELECT语句中查找结果数组中的最小值...可能吗? [英] Find the lowest value in an array of results within a SELECT statement... possible?
本文介绍了在SELECT语句中查找结果数组中的最小值...可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想对这个SELECT语句进行修改,以便它只在匹配数组中返回一个结果;即它找到的最低的Damerau-Levenshtein值。目前我正在获取多对,具体取决于我在WHERE子句中设置阈值的高度(当前< 6):
展开 | 选择 | Wrap | 行号
解决方案
我只是尝试使用这个功能,但它让计算机荒谬地陷入困境:
展开 | 选择 | Wrap | 行号
立即思考MIN ()可能是答案,但我得到一条关于EMP_ID不是聚合的消息......?
在这里应用:
展开 | 选择 | Wrap | 行号
这样的东西应该有效。
展开 | 选择 | Wrap | 行号跨度>
I''d like to make a modification to this SELECT statement so that it only returns a single result in an array of matches; namely, the lowest Damerau-Levenshtein value that it finds. Currently I''m getting multiple pairs presented depending on how high I set the threshold in the WHERE clause (currently <6):
Expand|Select|Wrap|Line Numbers解决方案I just tried using this function but it bogged down the computer ridiculously:
Expand|Select|Wrap|Line Numbers
Thinking now MIN() might be the answer but I get a message about EMP_ID not being an aggregate something....?
applied here:
Expand|Select|Wrap|Line Numbers
Something like this should work.
Expand|Select|Wrap|Line Numbers
这篇关于在SELECT语句中查找结果数组中的最小值...可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆