I’ll be the first person to admit- I’ve ALWAYS been a huge fan of views (instead of sprocs) because they really make things EASIER.
I’ve originally read about the importance of using views 12 years ago when I was playing around with Analysis Services.
I’m starting to finally use this notation- I wish I had start doing this 12 years ago
I just think that naming the columns in the create view statement is more elegant than giving each column an alias.
create view dbo.DWF_INVENTORY_ON_HAND_RealTime
SELECT ‘SJI’ as Prefix, ENTITY_CD, LOCATION_CD, ITEM_NO, QTY_ON_HAND, VOLUME_ON_HAND, MOVING_AVG_COST, LAST_COST, EXTENDED_COST, GetDate() as InsertDate
SELECT ‘BPB’ as Prefix, ENTITY_CD, LOCATION_CD, ITEM_NO, QTY_ON_HAND, VOLUME_ON_HAND, MOVING_AVG_COST, LAST_COST, EXTENDED_COST, GetDate() as InsertDate