my tables are CREATE TABLE [dbo].[formentries] ( [id] [int] IDENTITY (1, 1) NOT NULL , [entryid] [int] NULL , [storeid] [int] NULL , [formid] [int] NULL , [entrydate] [datetime] NULL ) ON [PRIMARY]GOCREATE TABLE [dbo].[formfields] ( [formfieldid] [int] IDENTITY (1, 1) NOT NULL , [formid] [int] NULL , [fieldname] [nvarchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [fieldtypeid] [int] NULL , [fieldrequiredid] [int] NULL , [fieldinstructions] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [orderby] [int] NULL , [storeid] [int] NULL ) ON [PRIMARY]GOCREATE TABLE [dbo].[formvalues] ( [id] [int] IDENTITY (1, 1) NOT NULL , [formfieldid] [int] NULL , [formfieldvalue] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [entryid] [int] NULL ) ON [PRIMARY]GOCREATE TABLE [dbo].[forms] ( [formid] [int] IDENTITY (1, 1) NOT NULL , [formname] [nvarchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [thankyoutext] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GO
my challenge here is a query that will return a table with form id it should return a table of all entries (filled in by formvalues)so for example my data in formfields is 1 myfirstname2 mylast name and in fieldtype 1 -firsntame2 lastnameit should returnFirstname lastnamemyfirstname mylastnames can someone help me with this?