由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - In SQL, is it possoble to define my own comparison function
相关主题
editting .sql file problemmysql的问题
a problem, thank youuser-defined data type的实例
Re: [转载] JDBC用完了oracle的large pool (memorhelp to answer a interview question
ODBC help!about joins
请问大侠: superkeygreat site to share; free
Problems to define database object in Access2000Re: A question for SQL Server
query操作你们喜欢用哪个SQL Tools?
Please Help! ORA-00918: column ambiguously definedRe: 数据库真烦人
相关话题的讨论汇总
话题: define话题: function话题: equal话题: where话题: sql
进入Database版参与讨论
1 (共1页)
D***h
发帖数: 183
1
For example, for tables A, B with Name, ID
I want to
select A.Name
from A, B
where A.Name = B.Name
but here the = is not strict equal. They are seen to be equal if these two
strings A.Name and B.Name are different with at most 1 character. For
example, 'John' and 'Johnn' are equal.
Is there any way to define a function to deal with this? Can I define a
function else where to define this equal, than then use it after "where"?
Thanks
i****a
发帖数: 36252
2
you can create a function that returns a table of results. but you cannot
overload an operator like "=", nor existing function

two
"where"?

【在 D***h 的大作中提到】
: For example, for tables A, B with Name, ID
: I want to
: select A.Name
: from A, B
: where A.Name = B.Name
: but here the = is not strict equal. They are seen to be equal if these two
: strings A.Name and B.Name are different with at most 1 character. For
: example, 'John' and 'Johnn' are equal.
: Is there any way to define a function to deal with this? Can I define a
: function else where to define this equal, than then use it after "where"?

B*****g
发帖数: 34098
3
if oracle 10g2+, try UTL_MATCH.EDIT_DISTANCE

【在 D***h 的大作中提到】
: For example, for tables A, B with Name, ID
: I want to
: select A.Name
: from A, B
: where A.Name = B.Name
: but here the = is not strict equal. They are seen to be equal if these two
: strings A.Name and B.Name are different with at most 1 character. For
: example, 'John' and 'Johnn' are equal.
: Is there any way to define a function to deal with this? Can I define a
: function else where to define this equal, than then use it after "where"?

1 (共1页)
进入Database版参与讨论
相关主题
Re: 数据库真烦人请问大侠: superkey
[转载] 申请Database版版主Problems to define database object in Access2000
SQL server 和SQL anywhere的区别是什么?query操作
Questions on SQLPlease Help! ORA-00918: column ambiguously defined
editting .sql file problemmysql的问题
a problem, thank youuser-defined data type的实例
Re: [转载] JDBC用完了oracle的large pool (memorhelp to answer a interview question
ODBC help!about joins
相关话题的讨论汇总
话题: define话题: function话题: equal话题: where话题: sql