In a t-sql 2012 view, I would like to sort the data by mailAddress. However a sort is not allowed in a view. Thus I am trying to determine an alternative. Here is what I have come up with so far:
CREATE VIEW dbo.vDirectCe
where mailAddress = space(1) or city = space(1) or state = space(1) or zip=space(1)
where (mailAddress <> space(1)) and (city <> space(1)) and (state <> space(1)) and (zip<>space(1))
Would you show no other options on what I can do to solve my problem?