Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

SSRS- CRM Dynamics Query with input parameters

$
0
0

declare @a varchar(500)
declare @b varchar(500)
set @a = '(select top 10 name from FilteredAccount) B'
set @b = 'select B.name as name2 from '+@a
exec(@b)

This query on SSRS query editor works fine 

But, i want to build this kind of Dynamic query with input parameter 'mm'

declare @a varchar(500)

set @a = 'select top 10 name from FilteredAccount where name = ' + @mm

exec (@a)

It wont support. How to build the dynamic query with input parameter? I dont want to create the stored procedure! !!


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images