Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamically pass value dynamically in trestquest with tmysqlinput

i have facing problem in to get  data from database using trestrequest , txmlmap and tmysqlinput. my question is i m passing value in url like {doctorName} and that value which i have passing in url and it search in tmysqinput using of  like   please Find attachment 

 

This is SQL

 

"SELECT
`doctor_details`.`id`,
`doctor_details`.`doctorName`
FROM `doctor_details` where `doctor_details`.`doctorName` Like  " + globalMap.get("request.doctorName")

Labels (4)
24 Replies
fdenis
Master
Master

remove where close
"SELECT id, doctorName FROM doctor_details"
or try with
"SELECT id, '" + globalMap.get("request.doctorName") +"' FROM doctor_details"
Anonymous
Not applicable
Author

it working fine but i have different one i need where clause to used of 'like' 

fdenis
Master
Master

yes you need the where clause.
first sql is to check that MySQL return things and the end of the job is ok.
the second one is to check globalMap values
do they are ok?
check query result with like clause and globalMap values
does it work in my sql editor?

Anonymous
Not applicable
Author

i have check in mysql work branch to write SQL Query in it return data with where clause and like method if i remove that where clause in talend then why used globalMap.get() to retrieve simple map then it got that data

fdenis
Master
Master

you are not in an inner join or in an outer join . you are looking for a partial math (using like '%xxxxxx%').
the match is done by sql like clause so you have to generate one SQL query by row.


if doctor name is a key roll back remove the like clause, remove reload for each row and make full match(case sensitive).