Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
obiwaugh
Starting Member
27 Posts |
Posted - 2004-12-22 : 14:22:49
|
| When translating codes to string descriptions (CA to California)Is it almost always recommended to use the CASE function rather than joining to a lookup table?Is the performance difference that noticeable?I know enough to know that I don't know enough. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-12-22 : 14:28:53
|
| Joining to a lookup table makes it more flexible.You can add and change entries without altering code.They are also held in one place rather in lots of code.This will outweigh any performance considerations except in exceptional circumstances.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
Posted - 2004-12-22 : 14:28:53
|
| >>Is it almost always recommended to use the CASE function rather than joining to a lookup table?I would say just the opposite :) |
 |
|
|
obiwaugh
Starting Member
27 Posts |
Posted - 2004-12-22 : 14:32:20
|
| Thanks for clearing that up.....I know enough to know that I don't know enough. |
 |
|
|
|
|
|