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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 var in Views

Author  Topic 

mdhingra01
Posting Yak Master

179 Posts

Posted - 2007-06-25 : 10:14:13
Is it possible to use VARiables in a view?

Currently the view is performing a calculation, based on a vale that is hard coded into the statment, but I would like to chage the view to lookup a value in a table and base the calc on that value. Is this possible

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-25 : 10:24:30
Not using a variable but you can join to the lookup table.

==========================================
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.
Go to Top of Page
   

- Advertisement -