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 |
sonjan
Starting Member
22 Posts |
Posted - 2013-06-24 : 21:07:52
|
HiI want to display all assets regardless of status, but if any assets are disposed, then only show disposed assets from 1 Jan 2011. I used a sub query, but it only displayed disposed assets egselect * from asset where siteid = 'fleet' and assetnum in (select * from asset where dispdate > '2010-12-31').ThanksSonja |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-06-24 : 21:40:21
|
[code]select *from assetwhere siteid = 'fleet'and (dispdate is null or dispdate >= '2011-01-01')[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|