string function in sql verver 2000
greetings,
i would like to ask how to implement string fucntion ove sql server 2000.
i am more on using c language, which have a built in function like strcmp(). instead i find out there's also some built in string function at sql server.
the motive i would like to use string compare is i am merging two similiar replicate table for data integrity.
case1:
let say same vendorid (universal PK), but diffrent description name allocate.
table1 table2
vendorid name vendorid name
A001 abc.com A001 abc.com
A002 abd.com A002 abe.com
A003 aaa.com A003 aaaa.com
i can used len() function to compare the length of any unmatch underlying the name column. (just like example shown at A003)
what if the lenght of the name is equal but with diffrent name description? i want to compare by each character underlying the name column. my concept is just like comparing each character at the array .
idea just like:
comparing
table.1name[n] = table2.name[n]
/*(example A002's abd.com && abe.com; i would like return those tuple which detected the 3rd char is different)*/
where table1.vendorid = table2.vendorid
any function in sql server 2000 can perform this action?
thank you
|