Hi @Vanipriya K ,
You should frame your query something below and it should help resolve your issue. In where condition you have to enclose the string in two single quotes shown below.
@concat('select E.EMPLOYEEID, E.LASTNAME, E.FIRSTNAME, ES.Salary , E.LOCATION from ', item().TableName,' E LEFT JOIN EmployeeSalary ES ON E.EMPLOYEEID = ES.EMPLOYEEID where E.LASTNAME = ''John1'' ')
I believe your query should look like below.
@concat('select * from ', item().TableName,' gcon
JOIN gjm_cutoffs gcut
ON gcon.cutoff_id = gcut.cutoff_id
and gcut.cutoff_id = (select max(cutoff_id) from gjm_cutoffs gcut where cutoff_type = ''W'' ')
Hope this helps. Do let us know how it goes.
----------
- Please don't forget to click on
and upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators