mysql join and issues with loading data -
i working mysql code , giving me headache, upload image of tables how , how trying fetch data.
the issue is:
i in process of doing update/insert
so query trying fetch common results both tables , if there no common stuff, want load tasktemplates tables values new.
here query trying
so below query runs in loop every record , check if record exists in temple or task tale or not.
it works if no task found, not load templates table, please guide should ..
thanks
select tasktemplates.*,task.* tasktemplates right join task on task.templateid = tasktemplates.id 1=1 , (templateid = #val(k)# or task.id = #val(k)#)
try it-
select tasktemplates.*,task.* tasktemplates left join task b on b.templateid = a.id
Comments
Post a Comment