October 2, 2021 at 4:40 pm
you need a query.
If you build a view, you have no "control" over how it gets used. I mean maybe it gets joined with in queries, ...
if you build a stored procedure, you can control the input parameters and you know exactly how the query will get executed. ( unless you use dynamic sql inside )
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
October 2, 2021 at 6:30 pm
A possible alternative to all that is maybe it should be in an iTVF (inline Table Valued Function) so that it can be called by multiple procs and still be "under control".
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2021 at 6:36 pm
Can you show me please what that code will look like?
October 2, 2021 at 7:54 pm
Can you show me please what that code will look like?
Sure but the is no clear definition that I can see of what the desired output is in the original post on this thread. The link for the picture that I think would have shown that is broken.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 2, 2021 at 10:15 pm
October 4, 2021 at 3:47 am
I'll try to get back to this tomorrow. I ran out of time today.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply