Click here to Skip to main content
15,890,438 members
Home / Discussions / Database
   

Database

 
GeneralRe: Without rollback Pin
Rock Star.15-May-09 3:15
Rock Star.15-May-09 3:15 
GeneralRe: Without rollback Pin
David Mujica15-May-09 3:31
David Mujica15-May-09 3:31 
QuestionRe: Without rollback Pin
Rock Star.15-May-09 20:54
Rock Star.15-May-09 20:54 
AnswerRe: Without rollback Pin
Mycroft Holmes15-May-09 22:10
professionalMycroft Holmes15-May-09 22:10 
QuestionNeed some help with SQL Join statements please Pin
MarkB77715-May-09 1:14
MarkB77715-May-09 1:14 
QuestionREport server Pin
Tauseef A15-May-09 0:48
Tauseef A15-May-09 0:48 
AnswerRe: REport server Pin
Niladri_Biswas4-Jul-09 20:16
Niladri_Biswas4-Jul-09 20:16 
QuestionCreate "report query" Pin
AlexeiXX314-May-09 20:48
AlexeiXX314-May-09 20:48 
Hi, thanks for looking

Im trying to make a query that will show me something like a report

I have a Homes table and a History table
Table Homes: Info about homes
Col: HomeID
Col: AddressID
Col: ...
Table History: A record for every status in wich a home has been
Col: HistoryID
Col: HomeID
Col: StatusID
Col: DateStarted
Col: DateFinished
Col: ...

A home can have up to 4 rows in the History (Status 1 - Status 4), what i need to do is a query that return something like this:
HomeID - Status1 - Status2 - Status3 - Status4
1  -  10/10/09 - 10/12/09 - 10/14/09 - 10/18/09
2 - ................

Here, im showing a home and the DateFinished column from the History table
In case that a home doesnt have statusX, null is ok

I was trying to create this view with the view designer, first i draged the Homes and History and made the query by filtering history with status1, so i got homeid and status1, then i had to redrag history with an alias and filter status2 to get status2 and so on
It seems really unefficient this way

Please let me know if you know another way to do it

Thanks in advance

Alexei Rodriguez

AnswerRe: Create "report query" Pin
Mycroft Holmes14-May-09 21:56
professionalMycroft Holmes14-May-09 21:56 
AnswerRe: Create "report query" [modified] Pin
Jörgen Andersson14-May-09 22:06
professionalJörgen Andersson14-May-09 22:06 
GeneralRe: Create "report query" Pin
AlexeiXX315-May-09 7:23
AlexeiXX315-May-09 7:23 
GeneralRe: Create "report query" Pin
Jörgen Andersson15-May-09 13:12
professionalJörgen Andersson15-May-09 13:12 
GeneralRe: Create "report query" Pin
AlexeiXX315-May-09 21:44
AlexeiXX315-May-09 21:44 
QuestionHow to create an exist database [modified] Pin
yueru14-May-09 16:22
yueru14-May-09 16:22 
Question[Message Deleted] Pin
munklefish14-May-09 0:41
munklefish14-May-09 0:41 
GeneralRe: STORE PROCEDURE: Problems with update statement Pin
jbracken197314-May-09 1:06
jbracken197314-May-09 1:06 
GeneralRe: STORE PROCEDURE: Problems with update statement Pin
munklefish14-May-09 2:08
munklefish14-May-09 2:08 
QuestionSQL and Novell [modified] Pin
aastudent13-May-09 20:16
aastudent13-May-09 20:16 
AnswerRe: SQL and Novell Pin
scottgp14-May-09 0:19
professionalscottgp14-May-09 0:19 
GeneralRe: SQL and Novell Pin
aastudent14-May-09 3:32
aastudent14-May-09 3:32 
GeneralRe: SQL and Novell Pin
scottgp14-May-09 4:32
professionalscottgp14-May-09 4:32 
QuestionStored Procedure problem >> Pin
kindman_nb13-May-09 15:29
kindman_nb13-May-09 15:29 
AnswerRe: Stored Procedure problem >> Pin
scottgp13-May-09 16:19
professionalscottgp13-May-09 16:19 
GeneralRe: Stored Procedure problem >> Pin
kindman_nb14-May-09 2:07
kindman_nb14-May-09 2:07 
GeneralRe: Stored Procedure problem >> Pin
scottgp14-May-09 4:14
professionalscottgp14-May-09 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.