Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi guys,I got a problem need your kindly helpI got two tables. 1 is code description likeinfo_type     code    despplan     A     product Aplan     B     product Bstatus     A     Auto-payand the second tables contain the record i userecord     plan     status0001    A     A0002     A     B0003     B     AI want to return the result as0001     A-Product A     A-Auto-payPresently, i created two views for code description which 1 is for the product's description and the other one is status' description.And then I join the table and the two views together.I know it's stupid but I don't know any better means to do so.Any suggestions? Any performance implication/impact if i decided to use subquery (if possible) or the joins?
fisherman_jake
Slave to the Almighty Yak
159 Posts
Posted - 2002-06-18 : 03:28:12
YIP,Nothing wrong with views (even the Guru Ken Henderson does not oppose them). Just make sure that the underlying queries that make up your views are as efficient as they can be!!Happy Coding.. ==================================================Do not argue with IDIOTS. They will take you down to their level and BEAT you with experience.Master Fisherman
yipchunyu
Yak Posting Veteran
80 Posts
Posted - 2002-06-18 : 05:03:03
thx a lot for you tips.I'm still writing the asp pages. a busy day for me >_<