on 05-19-2014 7:24 AM
Hi Experts,
I have facing issue while using Like in a query.
Please see the below scenario. I an trying to JOIN the two table using the mentioned fields. However since the values in the fileds isn't exactly same, I want to use LIKE to join them.
Table Name | Field Name | Data Type | Field value |
FCI_CS_SCORE_ATTR | RFX_SCORER_OBJECT_NAME | VARCHAR(120) | Jane Rux |
ODP_TMP_ESO_CS | SCORER_NAME | VARCHAR(360) | Jane Rux (jrux) |
I have tried below option but it's not working.
1. T1.SCORER_NAME LIKE T2.RFX_SCORER_OBJECT_NAME%
2.T1.SCORER_NAME LIKE T2.RFX_SCORER_OBJECT_NAME'%'
Can soemone please tell me how to use LIKE here or any other OPERAND that may help here.
Regards
Praveen
Hi Praveen,
PFB query which you can refer for your requirement.
select t2.display_name,t1.doc_owner_user_object_name,T2.FIRST_NAME from CLMSOURCE.FCI_CONTRACT T1,CLMSOURCE.FCI_UPP_USER_ACCOUNT T2
WHERE t1.doc_owner_user_object_name LIKE T2.FIRST_NAME||'%'
'||'-Oracle or '+'-MySQL should be used for appending based on DB you are using.
The above query worked for us as we are using Oracle DB.
Regards,
Vignesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.