Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi to all!

can some one tell me that whats the problem here my data is not displaying in the query below it shows the name of fields only
i want to display the field values


SQL
select sec_modules.modname_vc, sec_roles.rolename_vc, sec_functions.functionname_vc

from sec_umrf_details

left join sec_mrf_details on sec_mrf_details.mrfno_nu = sec_umrf_details.mrfno_nu
left join sec_modules on sec_modules.modid_int = sec_mrf_details.modid_int
left join sec_roles on sec_roles.roleid_int = sec_mrf_details.roleid_int
left join sec_functions on sec_functions.fnid_int = sec_mrf_details.fnid_int

where sec_mrf_details.mrfno_nu = 1
Posted
Updated 20-Aug-11 19:11pm
v2
Comments
Abhinav S 21-Aug-11 1:06am    
Are you sure there is a result available for all these joins?
kami124 21-Aug-11 1:10am    
yes i chect it twice there is result for sec_mrf_details.mrfno_nu = 1
and all other also

1 solution

I would try an inner join to see if you get the values where the join matches, and I'd remove the first table, as you don't actually grab any data from there. The data would have to match the value in the mrf table, so just grab it from there. Once you have a simpler query that works, you can start to make it more complex.
 
Share this answer
 
Comments
RaisKazi 21-Aug-11 3:34am    
Agree with Christian. 5.
kami124 - You should start with simple plain select Query first. See the result. And then start applying Joins one by one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900