So I have this table that holds these 'assets', there are say 25 'special asset's that can not be edited by the users because they are shared. However as a way to allow the users to edit the asset and have their own version it makes a copy of the original that they are then allowed to edit. The row in the table holds a value called OriginalAssetID once it is copied (otherwise it is zero). Now the hang up: We don't want the original asset to show up any more for that user when browsing assets. Once they make the personal copy of the original asset only their new personal one should show not both. So how can I make a query that says get all these assets, but don't get the ones that have an assetID that falls into one of the selected assets OriginalAssetID column? Keep in mind I cannot flag anything on the original asset itself because it is shared by other users who have not made a copy yet will still see it in their browse list. GOOD LUCK I HAVE BEEN TRYING TO FIGURE THIS OUT FOR HOURS.
(SQL Server 2005)
TO ADD SOME EXAMPLE:
asset one: asset_id = 5 orig_id = 0
asset two (is a copy of 1): asset_id = 12 orig_id = 5
so in this case we want to get back asset two only and no longer get back asset one because it is now copied and the copied version should be the live one, but we can't get rid of it because some other users may not have copied it yet thus for them they want to have asset one still