Viewing 15 posts - 2,146 through 2,160 (of 26,488 total)
Something like this may work:
with base as (
select
rn = row_number() over (partition by Account order by Sharetype asc)
, Account
,...
December 21, 2017 at 3:03 pm
December 21, 2017 at 2:40 pm
and i have verified...
December 21, 2017 at 2:37 pm
This is almost the exact same query from another post, it just has a DISTINCT TOP (1) added to it.
December 21, 2017 at 2:34 pm
December 21, 2017 at 2:27 pm
Good luck on this one: https://www.sqlservercentral.com/Forums/1914001/viewstablesstored-procedures-are-rolled-back-to-previous-versions.
December 21, 2017 at 2:22 pm
Code has been written some 3rd party consultant. Is there a way to...
December 21, 2017 at 2:20 pm
Have you seen his next question?
https://www.sqlservercentral.com/Forums/Topic1913979.aspx
December 21, 2017 at 2:13 pm
I stand corrected, I got to the end of code and found why it is dynamic SQL, your ORDER BY clause can use a different column on each instantiation of...
December 21, 2017 at 1:59 pm
This snippet doesn't even make sense:
AND (NOT EXISTS (SELECT 1 FROM @SampleStatusId) OR samp.SampleCondition IN (SELECT id FROM @SampleStatusId))
EDIT: Nevermind, it does now.
December 21, 2017 at 1:51 pm
Second, why are you using dynamic SQL inside the stored procedure? I am not seeing ANY reason for dynamic SQL to be used. I am seeing a lot a poor...
December 21, 2017 at 1:46 pm
First, why are you executing the stored procedure using dynamic SQL?
December 21, 2017 at 1:32 pm
December 21, 2017 at 1:26 pm
December 21, 2017 at 12:55 pm
Viewing 15 posts - 2,146 through 2,160 (of 26,488 total)