I’m having some trouble and can’t seem to find the solution. Hopefully someone here can help me out.
I have two tables in a SQL Database and I’m trying to select some information from both tables where the column‘UniqueID’ has the same value.
Here is the information I require from the Tables:
Table Name:
Featured
Column Names:
UniqueID (value for both tables)
Approve
Date_Activation
Table Name:
Information
Column Names:
UniqueID (value for both tables)
Headline
Description
Ref_No
Rowguid
I found some information that said I could create a WHERE statement like the following:
where Table1.ColumnName = Table2.ColumnmName
I have tried this and it’s not working. Here’s my code:
select
UniqueID as UniqueID,
Headline as Headline,
Description as Description,
case when Approve = '1' then 'True' when Approve is null then 'False' else 'False' end as Approve,
Ref_No as RefNo,
Rowguid
from Featured, Information
Where Featured.UniqueID = Information.UniqueID
order by Date_Activation asc
Any help with this would be greatly appreciated.