Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I have used the following code for joining two tables. But it doesn't return any value.
OracleDataReader oraReader = null;
OracleCommand oraCommand = new OracleCommand("select name,code,age,city from personal inner join address on personal.NO=address.NO where NO='" + NO+ "'", con);
oraReader = oraCommand.ExecuteReader();
Posted
Updated 17-Jun-15 20:38pm
v2
Comments
Sreekanth Mothukuru 18-Jun-15 1:50am    
I think you missed the table name in the where clause. It should be like

where address.NO or personal.NO
[no name] 18-Jun-15 2:05am    
Yea It works. Thanks
Sinisa Hajnal 18-Jun-15 2:38am    
Put it as a solution so it gets off the unaswered list

1 solution

I think you missed the table name in the where clause. It should be like

where address.NO or personal.NO
 
Share this answer
 

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