home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,755 of 19,505   
   Gert-Jan Strik to SQL Learner   
   Re: Convert numeric grade to letter grad   
   09 Feb 10 18:11:49   
   
   c6122c60   
   From: sorrytoomuchspamalready@xs4all.nl   
      
   SQL Learner wrote:   
   >   
   > Thank you for your feedback and help, guys.   
   >   
   > The one-column table was used only for the purpose of simplication.   
   > My objective was to know how to get a second column which contains the   
   > converted values from the first column.  The application can be used   
   > for many occuations.  For one, we can use it to convert, say "NY",   
   > "CA" .... to "New York", "California"...   
   >   
   > What Plamen provided was enough for the purpose.   
   >   
   > I think in term of efficient, Gert-Jan's method may be the best if I   
   > have a lot of data to "convert".   
   >   
   > SQL Server   
      
   IMO, data should be in a database, not in a query. The example you give   
   in this post is a typical example of a states table.   
      
   What I would like to add is that you don't want to have the same CASE   
   expression in multiple places, because that makes it very hard to   
   maintain. So I would advise against creating lookup tables in   
   expressions. On the other hand, a CASE expression can be a great   
   solution for data formatting or adding default descriptions.   
      
   --   
   Gert-Jan   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca