forum.venkateswarlu.net
      Register      Login
Can we create a view in SQL Server with parameters?

1 replies to this topic

Jahnavi N #1
Member
164 Points
Posted on 24 Jul 2013 03:17 PM IST When I tried to create a view with parameters to filter the data, I am getting the below error.

Msg 1033, Level 15, State 1
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.


 
SQL Server     852 views     Reply to this topic
Subramaniam R #2
Member
152 Points
Replied on 25 Jul 2013 11:03 AM IST

No we can not create view with parameters.

view is a virtual table or combination of result set by using various set of tables with join or with out join.

we can not pass a parameter to view like user defined function or stored procedure.

 

 
Reply to this topic