hi vinayak
I wrote your query in sql it worked.
how i can use it in my web page i want replace your query with this code
SqlCommand _cm2 = new SqlCommand(" select * from furniture_ch where F_code ="+Request.QueryString["Code"], _cn);
I wrote this code i have query string in my code
SqlCommand _cm2 = new SqlCommand(" SELECT address ,tell,name,(Select COUNT(behcode) from furniture_p where behcode= furniture_ch.behcode) as [count] from furniture_ch order by [count] desc where F_code ="+Request.QueryString["Code"], _cn);
but when run occur this error
if (_cn.State != System.Data.ConnectionState.Open) _cn.Open();
SqlDataReader _dr = _cm2.ExecuteReader();
here in this line :
ERROR:
Incorrect syntax near the keyword 'where'.
how i can use your query?