MySQL Forums
Forum List  »  General

Re: SQL Query help needed
Posted by: Shreya P
Date: April 26, 2016 11:41PM

Thanks Mr.Peter Brawley,

I apologize, if I have not explained the requirement clearly.

It is not a school project.

I am doing a small project where I have to do the string comparsion between the source and the reference data. Each source record will have multiple recrods in the reference data.

For each product_name and the model there are multiple variants.

THis is my Refernce data (lookup)

"model", "variant"
"Blueline", "183 CY/A/E Series Split AC 1.5 Ton, 3 Star Rating, White"
"Blueline", "183 CY/A/E Series Split AC 1 Ton, 5 Star Rating, Black"
"Blueline", "183 CY/A/E Series Split AC 1 Ton, 5 Star Rating, Black"

"Blueline Premier", "193 CY/A/G Series Split AC 1.5 Ton, 5 Star White"
"Blueline Premier", "188 CG/A/Y Series Split AC 1.0 Ton, 5 Star Black"


Source info

"model", "variant"
"Blueline", "183 CY/E Series Split AC 1.5 White 3 Star Rating"

My requirement is to match only those records where the source model is "Blueline" and do the string comparison to narrow down and take the record where the string comparison score is highest. If I give the model like "Blueline%" then it will pull all the records starting with the values Blueline .." in such case my string comparison will happen on all the records where model names are like Blueline%. It will be time consuming as well as it may return the wrong variant based on the string compariosn score.

Regards
Shreya P

Options: ReplyQuote


Subject
Written By
Posted
April 22, 2016 01:03PM
April 22, 2016 03:55PM
April 22, 2016 10:45PM
April 26, 2016 06:04PM
Re: SQL Query help needed
April 26, 2016 11:41PM
May 06, 2016 05:40PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.