hi Vishnu,
what error are you getting?
Please provide the stack trace.
From what i noticed on the SQL query, there is no JobName column in Job table. It has a JobDefinition column filled with values that refer to the JobDefinition table entries. So there should be a sub query that fetches that job definition that matches the "value". then the main query that fetches all the jobs that match that job definition.
What are you trying to achieve? what does the table contain? May be there is an alternate way to do it.
Thanks
Nanda