Hi everybody! I am sure this is pretty simple to do but I can’t do that. My problem : I Have sql server data base with two table :1-parent_table 2-child_table Parent table has 5 columns as follow: Id emp_num group_num edit_num name_emp ------------------------------------------------ 1 912230 1 1 James 2 912230 1 2 James 3 912230 2 1 David 4 912230 2 2 David 5 914350 1 1 John 6 914350 2 1 Mark . . . Id column is primary key and each record of name_emp has exclusive emp_num and exclusive group and may has many edition_num . each record in parent table is exclosive. For each records of parent table Exist many records in child table. Id emp_num group_num edit_num name_emp good payment date discount --------------------------------------------------------------------------------- 1 912230 1 1 James egg 100 20016/01/01 10 2 912230 1 1 James pear 200 2016/02/01 15 3 914350 2 1 mark egg 100 2016/02/02 10 . . . How can I get to latest record of (emp_num of X group of x edit) in child table for each record in parent table not base on date but i maen last record that inserted For e.g how can I select id = 2 in chld table and how can I show Count rows which discount > 0 in lable.Text Please help! Thanks
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)