Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Using a calculated field in a query

$
0
0

Hi,

I have a parameter called Company which is a drop down list for the user to select from. I have also created a calculated field called CompanySelection which looks at what is selected in the parameter and references that value in a field value

=IIFParameters!Company.Value = "Joe Bloggs" then Fields!customer.Value = "11111"

Is there a way I can then add the calculated field to the data source query as a where condition? Something like

Select ZZZ from YYY where AAA between @startdate and @enddate and customer = Fields!customer.Value or something of the sort.

Thanks


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>