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 |
|
Vivaldi
Constraint Violating Yak Guru
298 Posts |
Posted - 2001-03-30 : 20:12:45
|
| Hey,I am working late trying to finish up a simple report [so i thought] where a userchooses a month and amount of days and submits them to reveal a report that lists.All people that have have been in the facility [jail] during the month specified and for at least the days specified within that month. (current year implied)there are two important dates Booking Date and Discharge Date.Booking Date has to exist, discharge doesntInfo table has residentid | Name | bookingdatedischarge table hasresidentid | dischargedateI am doing this through an asp page so its a bit tricky for me using logic in a sql statement.I would post my trys at this, but they are rather large and get extremely unreadable in this box. I know the logic, but i want a wayto say if Discharge is NULLthen append (set of sql where statements)elseappend other sql where statementsendI have been trying to read the t-sql but they only have one example style of using an if else statement in sql.Any Help would be appreciated.Software Composer |
|
|
|
|
|