var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Is there a quicker/more efficient way to change result names besides CASE?
Select StoreId from tblStores
I want to display a more friendly name. I have been using a case statement:
WHEN storeId = 'S1' THEN 'NY Store'
WHEN storeId = 'S2' THEN 'CA Store'
end AS StoreName
If I am doing a simple 1:1 mapping like that, is there a better way than using a case statement (without creating/modifying tables)?
nope. the best way is to create a mapping table so that its scalable and more maintainable
if you cant create table, there's no way unless you're using SQL 2012 in whic case you can use series of IIF() for getting the result
are you trying to say that the tblStores table does not have a StoreName column, and you can't fix it so that it does?
Originally Posted by clawlan
dude, my condolences