H have 2 tables. Table 1 is InterestTable 2 is NoteTable 1 has a composite key build on it with fields (Vendor_ID & Offers)Table 2 has an index on Vendor_ID that I need to have as a foreign key to the interest.vendor_ID field.How can I accomplish this? SSMS is giving me grief because of the composite key.See below/****** Object: Table [dbo].[Interest] Script Date: 08/07/2015 12:13:42 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Interest]( [Vendor_ID] [int] NOT NULL, [Bank] [int] NULL, [Offers] [int] NOT NULL, [Credit_Limit] [int] NULL, [APR] [float] NULL, [Delinquency_APR] [int] NULL, [Down_Payment_Deposit_Amt] [int] NULL, [Minimum_Pay_Percent] [int] NULL, [Minimum_Pay_Amt] [int] NULL, [Estimated_Payoff] [int] NULL, [Possible_Payoff_Duration] [int] NULL, [Late_Fee] [int] NULL, [NSF_Fee] [int] NULL, [Variable_Fix_Pay] [float] NULL, [BankNumber] [int] NULL, [InterestPercentage] [float] NULL, [InterestDeferralMonths] [varchar](50) NULL, [InterestDeferralType] [varchar](50) NULL, [ProgramDescription] [varchar](50) NULL, CONSTRAINT [PK_Interest] PRIMARY KEY NONCLUSTERED ( [Vendor_ID] ASC, [Offers] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]/****************************************************************************************//****** Object: Table [dbo].[Note] Script Date: 08/07/2015 12:14:58 ******/CREATE TABLE [dbo].[Note]( [NoteID] [int] IDENTITY(1,1) NOT NULL, [Vendor_ID] [int] NOT NULL, [NOTES] [varchar](max) NULL) ON [PRIMARY]GOSET ANSI_PADDING OFFGO
↧