i am sharing a java code related to my question, by that you can easily understand what i am exactly looking in SQL.
Java code
String s1 = "http://hdvidz.co/video/file/Naa-Peru-Meenakshi-%7C-11th?id=rj5e--8vQb4";
String s2 = "Naa Peru Meenakshi";
String splitStringS2[] = s2.split(" ");// using blank space to split
int i = 0;
for (String a : splitStringS2) {
if (s1.contains(a)) {
i = i + 1;
} else {
System.out.println("break perform");
i = 0;
break;
}
}
System.out.println("value of i=== " + i);
i have 2 table ; table A has a column "link" that contain value "http://hdvidz.co/video/file/Naa-Peru-Meenakshi-%7C-11th?id=rj5e--8vQb4";
table B has a column "name" that contain value "Naa Peru Meenakshi"
CREATE TABLE `A` (`link` VARCHAR(255) );
insert into A values("http://hdvidz.co/video/file/Naa-Peru-Meenakshi-%7C-11th?id=rj5e--8vQb4");
CREATE TABLE `B`(`name` VARCHAR(255) );
insert into B values("Naa Peru Meenakshi");
now what exactly i want
1) pick a value from table B and split into substring and store in array splitName.
2) pick a value from table A & store in variable url
3) now checking substring (splitName) exist in variable url
4) if all substring found in url return count (substring match) , else return 0
above java code is doing same thing.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…