Hi all I am new to functions so am having a bit starting trouble here
I have two tables like this
Bugs
BugID|Title|ProjectName|CreatedBy
BugHistory
BughistoryID|BugID|Assignedto|ToStatus|FromStatus
I want to write an insert stored procedure for the Bugs table where I will insert [Title]|[ProjectName] and [CreatedBy] into the bugs table and BugID has Identity and primary key.
After that, I have to insert the BugID of the new title and Tostatus into the BugHistory table. These two steps should be done in a single stored procedure.
I want a select statement where I have to show the bugs table in gridview with [AssignedTo] and [Tostatus] columns from BugHistory table. How can I use functions for this both procedure s any ideas please?
Try something like this: