the query which was comment work paerfectly but when try down ward query it prompt me this error
Incorrect syntax near 'Project_Inventory_TBL'.
dsGraph = new DataSet();
SqlConnection con = new SqlConnection(connectionString);
con.Open();
if (ddlCountries.SelectedItem.Text == "Select")
{
Get_Total_GraphData();
}
else
{
// SqlDataAdapter adap = new SqlDataAdapter("select Proj_Status,count(Proj_ID) * 1.0 / "
// + "(select count(Proj_ID) from Project_Inventory_Tbl) as status from Project_Inventory_Tbl"
// + " where Proj_Team_Lead='" + ddlCountries.Text + "' group by Proj_Status", con);
SqlDataAdapter adap = new SqlDataAdapter
("Select Proj_Status, (Count(Proj_ID) * 100 / (Select Count(*) From Project_Inventory_TBL where Proj_Team_Lead='" + ddlCountries.Text + "' )) as status"
+ "From Project_Inventory_TBL where Proj_Team_Lead='" + ddlCountries.Text + "' group by Proj_Status", con);
adap.Fill(dsGraph);
Chart1.DataSource = dsGraph;
Chart1.Series["Series1"].XValueMember = "Proj_Status";
Chart1.Series["Series1"].YValueMembers = "status";
Chart1.Legends[0].Enabled = true;
Chart1.Series[0].LegendPostBackValue = "#VALX";
Chart1.Series[0].LabelPostBackValue = "#VALX";
Chart1.Series[0].PostBackValue = "#VALX";
con.Close();
}