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 |
|
ijack
Starting Member
3 Posts |
Posted - 2011-02-07 : 21:06:06
|
| removed |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
ijack
Starting Member
3 Posts |
Posted - 2011-02-07 : 22:24:04
|
| Thoughts??? Here's what I have for the sql #2:create function get_marital_status(@pass char(8),@date datetime)returns tableasreturnselect top 1c.[passport no],c.[Marital Status],ch.[Date of Change]from citizens cleft outer join changes chon c.[passport no] = ch.[passport no]wherec.[passport no]=@pass and((ch.[Date of Change]<=@date and ch.[Date of Change] is not null) or ch.[Date of Change] is null)order bych.[Date of Change] descfmar |
 |
|
|
|
|
|