thayduck
asked on
SSRS 2008 Dataset Query Command Text Error
Below Query Command Text runs fine in SSRS Dataset to retrieve records. It retrieves data from a function with parameters.
SELECT DISTINCT
SubRegion
FROM WKLD.fnGetOEDGETransReport Data(@From Date,@ToDa te,@FromHr ,@ToHr,@Fr omMin,@ToM in,@Office ,@Desk,@Sh ift,null)
ORDER BY 1
Now, what I am trying to do is add a Where Clause so the query looks like this.
SELECT DISTINCT
SubRegion
FROM WKLD.fnGetOEDGETransReport Data(@From Date,@ToDa te,@FromHr ,@ToHr,@Fr omMin,@ToM in,@Office ,@Desk,@Sh ift,null)
Where ActivityName = "TOP"
ORDER BY 1
But, I get the below error.
Invalid column name 'TOP'.
How can I include a Where Clause in this query or can it not be done.
I do not want to change the function since I did not write it unless I have to.
Just want to change this Query Command Text in the SSRS Dataset to include Where Clause.
SELECT DISTINCT
SubRegion
FROM WKLD.fnGetOEDGETransReport
ORDER BY 1
Now, what I am trying to do is add a Where Clause so the query looks like this.
SELECT DISTINCT
SubRegion
FROM WKLD.fnGetOEDGETransReport
Where ActivityName = "TOP"
ORDER BY 1
But, I get the below error.
Invalid column name 'TOP'.
How can I include a Where Clause in this query or can it not be done.
I do not want to change the function since I did not write it unless I have to.
Just want to change this Query Command Text in the SSRS Dataset to include Where Clause.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried it that way and it still failed.
ASKER
I am going to close this question since I have a work around.
ASKER
I figured out how to get it to work.
'Top'