I am Joining 2 table Purchase and Item_Master error occurred
Join query
select ItemID,PurchaseID
from Purchase
JOIN Unit ON Purchase.ItemID = Item_Master.ID
JOIN Brand ON Purchase.VenderID = vendor_master.ID
error
Msg 4104, Level 16, State 1, Line 3
The multi-part identifier "Item_Master.ID" could not be bound.
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "vendor_master.ID" could not be bound.
tables script
Purchase
CREATE TABLE [dbo].[Purchase](
[PurchaseID] [int] IDENTITY(1,1) NOT NULL,
[ItemID] [int] NOT NULL,
[Quantity] [int] NOT NULL,
[VenderID] [int] NOT NULL,
[Date] [date] NOT NULL,
CONSTRAINT [PK_Purchase] PRIMARY KEY CLUSTERED
(
[PurchaseID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRI ...
Go to the complete details ...