Posted on: 9/27/2013 1:02:23 AM | Views : 291

I am writing a stored procedure but stuck....
In the database there is a Models Table, an Assignments table and
a junction table called "ModelAssignments"

I want to get all the data from model table based on the @AssignmentId
parameter. There is foreign key "ModelsId" in ModelAssignments and Assignments table.




have the following stored procedure but but want to edit it so that it does this
fetches all dr
SELECTS ALL from the Models table and
USE [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] GO /****** Object:  StoredProcedure [dbo].[model1]    Script Date: 09/26/2013 15:43:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[model1]     @LastName nvarchar(50),     AS     SET NOCOUNT ON;     ...

Go to the complete details ...