Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nlocklin
Yak Posting Veteran
69 Posts |
Posted - 2001-09-26 : 16:38:55
|
| Ok, it's near the end of the day here and so maybe I'm just missing the obvious, but here's what I'm having a hard time writing a SQL statement for:I have one table with people's personal information, and another table with a series of forms for each person. There will be up to eight forms in the form table for each person, numbered 1-8 in the FormNumber field:tblPersonPersonID - primary keyFirstNameLastNameetctblFormsFormID - primary keyPersonID - foreign keyFormDateFormNumberetcWhat I'm trying to do is write a select statement that will return the person's ID number, along with the FormDate (labelled FormDate1, FormDate2, FormDate3, etc) for each of the eight possible forms received. If there is no entry for that particular form number, the FormDate value for that particular form should just be NULL. Any help or advice would be very much appreciated.--"It's not that I'm lazy, it's that I just don't care." |
|
|
|
|
|