Noman Tariq
SSCommitted
Points: 1750
More actions
January 12, 2006 at 5:44 am
#68640
hi,
Please guide me how can i use local variable in the View... im using like this:
CREATE VIEW V_view
declare @count int
set @count = 1
sql server giving me the syntax error.. please guide me to write the right code.
thanx
Noman
peterhe
SSChampion
Points: 11469
January 12, 2006 at 7:25 am
#614340
THis is not supported.
Instead of view, you can define a table valued function, which supports local variables etc.
in most cases, a table valued function can be used in the same way as a view
Chris Hedgate
One Orange Chip
Points: 25041
January 12, 2006 at 7:39 am
#614353
If you tell us what you are trying to do with the view we can give you more advice.
--Chris Hedgate http://www.hedgate.net/Contributor to the Best of SQL Server Central volumesArticles: http://www.sqlservercentral.com/columnists/chedgate/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply