Hi there, I am a newbie to MSSQL. I apologise first as I know that my question might have been asked by others elsewhere but unfortunately I couldn't find it. I will really appreciate if someone can shed some light into my question.
I have two tables with the following fields respectively:
1. ProjectTABLE
projectid (int)
projectName (varchar)
2. photoTABLE
photoid (int)
projectid (int)
path (varchar)
approved (true or false)
I would like to retrieve the projectid, projectName, (path, where photoTABLE.approved=true), where projectid = @projectid
How can this be possibly done. How the SQL query should be written? Thanks.