string str = string.Format(@"select m.autoid,m.pcode, m.fyyear, m.date, m.salary, m.ta, m.contigency, m.nrc, m.institcharges, m.others,y.yearlyalloc,y.salary,y.ta,y.contigency,y.nrc,y.institcharges,y.others FROM monthly AS m inner join yearly y pcode where m.pcode=('" + DropDownList1.SelectedItem.ToString() + "' ) AND y.fyyear=('" + DropDownList2.SelectedItem.ToString() + "')", con); SqlDataAdapter da = new SqlDataAdapter(str, con); DataTable dt = new DataTable(); da.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind();
where m.pcode=('" + DropDownList1.SelectedItem.ToString() + "' )
select * FROM monthly AS m inner join yearly y on m.pcode=y.pcode where m.pcode=('" + DropDownList1.SelectedItem.ToString() + "' ) AND y.fyyear=('" + DropDownList2.SelectedItem.ToString() + "'
on m.pcode=y.pcode
SELECT ft.col1, ft.col2, st.col1, st.col2 FROM FristTable ft INNER JOIN SecondTable st ON ft.colname = st.colname
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)