Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
select P.productid,  P.displayname, P.skuno, P.haslicense,P.isevalversion,O.oemname from productmast P Inner join userpermission U on P.productid=U.productid join oemmast O on P.oemid=O.oemid


This query is running on the Sql Server Management Studio but when i am using it to bind the GridView then its not working . Its showing error regarding oemid not exist
Posted
Updated 10-Oct-11 2:08am
v2
Comments
sachin10d 10-Oct-11 8:10am    
can you show datagridview binding code
P.Salini 10-Oct-11 8:12am    
can you show your binding code
hitech_s 10-Oct-11 8:16am    
try replace join with innerjoin

could you plz provide your .aspx code of gridview

1 solution

Hi,

try this query once

SQL
select P.productid,  P.displayname, P.skuno, P.haslicense,P.isevalversion,O.oemname,P.oemid from productmast P Inner join userpermission U on P.productid=U.productid join oemmast O on P.oemid=O.oemid


Here you've to retrieve P.oemid also in first join then only you can compare in second join

All the Best
 
Share this answer
 
Comments
Vimalrashamra 11-Oct-11 1:00am    
Its also giving the same problem
Muralikrishna8811 11-Oct-11 4:15am    
try like
select *
from productmast as P,userpermission as U,oemast as O
where conditions

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