SQL is still relatively new to me but I have generated this from research I have done.
This is my sql command:
"SELECT Array_ID
FROM Array_Location JOIN
Obj_Type.Type_ID ON Array_Location.Obj_Type
WHERE (Obj_Type.Object = 'CIRCLE')
OR (Obj_Type.Object = 'POLYGON');"
This is my error
An expression of non-boolean type specified in a context where a condition is expected, near 'WHERE'
This is a syntax problem but i'm not sure on the solution
The two tables I have are:
CREATE TABLE [dbo].[Obj_Type] (
[Type_ID] INT NOT NULL,
[Object] TEXT NOT NULL,
CONSTRAINT [PK_OBJ_TYPE] PRIMARY KEY CLUSTERED ([Type_ID] ASC)
);
CREATE TABLE [dbo].[Array_Location] (
[Array_ID] INT NOT NULL,
[Obj_Type] INT NOT NULL,
[Element_ID] INT NOT NULL,
CONSTRAINT [Array_Location_fk0] FOREIGN KEY ([Obj_Type]) REFERENCES [dbo].[Obj_Type] ([Type_ID]) ON UPDATE CASCADE
);
Thanks