December 9, 2016 at 3:35 pm
Hi I have a issue. When I am using this scrpit in SSRS its showing error.
select sales.SalesTerritory.TerritoryID , sales.SalesTerritory.Name , sales.SalesTerritory.CountryRegionCode,
sales.SalesTerritory.[Group] ,
sales.SalesTerritory.SalesYTD, year(sales.SalesTerritoryHistory.StartDate) as [Year]
from sales.SalesTerritory join sales.SalesTerritoryHistory on
Sales.SalesTerritory.TerritoryID = sales.SalesTerritoryHistory.TerritoryID
where Sales.SalesTerritory.[Group] in (@Sales.SalesTerritory.[Group])
Error is
TITLE: Microsoft SQL Server Report Designer
------------------------------
An error occurred while executing the query.
Cannot call methods on nvarchar.
------------------------------
ADDITIONAL INFORMATION:
Cannot call methods on nvarchar. (Microsoft SQL Server, Error: 258)
Looking forward for your help.
Thank you.
December 9, 2016 at 11:04 pm
swarun999 (12/9/2016)
Hi I have a issue. When I am using this scrpit in SSRS its showing error.select sales.SalesTerritory.TerritoryID , sales.SalesTerritory.Name , sales.SalesTerritory.CountryRegionCode,
sales.SalesTerritory.[Group] ,
sales.SalesTerritory.SalesYTD, year(sales.SalesTerritoryHistory.StartDate) as [Year]
from sales.SalesTerritory join sales.SalesTerritoryHistory on
Sales.SalesTerritory.TerritoryID = sales.SalesTerritoryHistory.TerritoryID
where Sales.SalesTerritory.[Group] in (@Sales.SalesTerritory.[Group])
Error is
TITLE: Microsoft SQL Server Report Designer
------------------------------
An error occurred while executing the query.
Cannot call methods on nvarchar.
------------------------------
ADDITIONAL INFORMATION:
Cannot call methods on nvarchar. (Microsoft SQL Server, Error: 258)
Looking forward for your help.
Thank you.
Question, what is @Sales.salesterritory.[Group]?
😎
December 10, 2016 at 12:14 pm
Hi,
I was trying to make DrillThru report. It is a parameter.
I am trying to create charts in SSRS. So when click on the Europe, in the other chart it should open the CountryRegion that belongs to Europe.
The above one query that i have written in CountryRegion Query Designer.
Thank you
December 10, 2016 at 1:29 pm
In SQL, one cannot use this kind of a where clause, if using multiple values it will have to be a sub query
😎
where Sales.SalesTerritory.[Group] in (@Sales.SalesTerritory.[Group])
should be something like
where Sales.SalesTerritory.[Group] in (select [Group] FROM @Sales.SalesTerritory)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply