help insert employees to #temp table all monthand loop insert until the last employeei have table employeeempid name-------------------- 1111 xxxx 2222 yyyy-----------------------now i need to insert all the employee for all month to one tablelike thisinsert empid=1111to tb_tempstart day=01/02/2008end day = 11/02/2008val=1NEXTinsert empid=2222to tb_tempstart day=05/02/2008end day = 20/02/2008val=5NEXT....
and after i need to get the employee in the temp_tableBUT WITH conditionand only on Saturday + Sundayi need to change the val !if 'Saturday'than val=55if 'Sunday'than val=99 if 'monday'Normal processingif 'tuesday'Normal processingif 'wednesday'Normal processingif 'thursday'Normal processingif 'Friday'Normal processing
.........................empid date val day name-----------------------------------1111 1/2/2008 1 Tuesday1111 2/2/2008 1 Wednesday1111 3/2/2008 1 Thursday1111 4/2/2008 1 Friday1111 5/2/2008 99 Saturday1111 6/2/2008 55 Sunday1111 7/2/2008 11111 8/2/2008 11111 9/2/2008 1 1111 10/2/2008 11111 11/2/2008 12222 6/2/2008 55 Sunday2222 7/2/2008 5 Monday2222 8/2/2008 5 Tuesday2222 9/2/2008 5 Wednesday2222 10/2/2008 5 Thursday2222 11/2/2008 5 Friday2222 12/2/2008 99 Saturday2222 13/2/2008 52222 14/2/2008 52222 15/2/2008 52222 16/2/2008 5----------------TNX