| От | Brian Johnson |
|---|---|
| Тема | Adding two select statements together |
| Дата | |
| Msg-id | 005201c1e55a$e413ba40$3200a8c0@jecinc.on.ca обсуждение исходный текст |
| Ответы |
Re: Adding two select statements together
|
| Список | pgsql-novice |
I don't know if the subject line is a correct description I have three tables for entering time data for projects. The three tables are timeentries, projects, and projectstatus. timeentries references the project id from projects and projects references the projectstatus table I want to select all of the projects that aren't defined as "Inactive" like so SELECT testproject.*, teststatus.name FROM testproject INNER JOIN teststatus ON testproject.status = teststatus.id WHERE (teststatus.name<>"Inactive"); but I also want to include any projects that are referenced by the timeentries between two dates (without having duplicate project listings) This added complication is where I get totally lost - any help?
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера