sql server中的参数化视图 [英] parameterized view in sql server

查看:132
本文介绍了sql server中的参数化视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



你可以帮我写一个参数化视图吗



谢谢,

Ramesh.m

Hi all,

can you help me out how to write a paramerized view

Thanks,
Ramesh.m

推荐答案

创建函数而不是View以实现相同的目标。



请参阅

http://www.sqlhacks.com/Retrieve/Parameterized-View [ ^ ]

http:/ /stackoverflow.com/questions/4498364/create-parameterized-view-in-sql-server-2008 [ ^ ]
Create function rather then View for achieving the same.

See
http://www.sqlhacks.com/Retrieve/Parameterized-View[^]
http://stackoverflow.com/questions/4498364/create-parameterized-view-in-sql-server-2008[^]


我建​​议您使用动态查询:在存储过程中构建动态SQL [ ^ ]



另一个解决方案是构建动态 WHERE clasue:实施动态静态SQL中的WHERE-Claince [ ^ ]



这些概念是否足以启动?
I would suggest you to use dynamic queries: Building Dynamic SQL In a Stored Procedure[^]

Another solution is to build dynamic WHERE clasue: Implementing Dynamic WHERE-Clause in Static SQL[^]

Does these conceptions are enough for start?


这篇关于sql server中的参数化视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆