hi guys,
plz help
i have one table of employee registration containing fields like s_no,level,name ...etc
i have completed the registration
the values for level column will be 1,2,3....20.
but now i have to give some award every month to these employees
and for that i have another table where i have s_no,month,year,amount
now i just want to select all the s_no from 1st table and belonging to the respective level and assign some money to every employee belonging to respective level.
for example i have a dropdownlist containing levels 1 to 20
when admin will select the level,for example 1 ,at that moment i will select all the s_no belongs to level 1
now the main work
and the admin will enter the amount fir level one in a textbox
now i want to insert all s_no's of level 1 with amount in another table
plz tell me how to do this
Loading
Guest UserPosted Apr 15, 2011, 9:04 AM
USE AdventureWorks2008R2;
GO
CREATE TABLE MySalesReason
( SalesReasonID int NOT NULL,
Name nvarchar(50),
ModifiedDate datetime);
GO
INSERT INTO MySalesReason
SELECT SalesReasonID, Name, ModifiedDate
FROM AdventureWorks2008R2.Sales.SalesReason
WHERE ReasonType = N'Marketing';
GO
SELECT SalesReasonID, Name, ModifiedDate
FROM MySalesReason;
GO
http://msdn.microsoft.com/en-us/library/ms189872.aspx