Groups | Blog | Home
all groups > sql server reporting services > march 2006 >

sql server reporting services : dataset question


Tango
3/14/2006 10:04:27 PM
hi,
i am trying to run the following query in the dataset which works fine when
i have a number in the branch_code

SELECT tbl_calendar.date, tbl_day_type.day_type
FROM tbl_calendar INNER JOIN
tbl_day_type ON tbl_calendar.day_type =
tbl_day_type.type_id
WHERE (tbl_calendar.date BETWEEN
(SELECT opened_date
FROM
HOBISINT.account_statistics.dbo.t_branches
WHERE branch_code = 56) AND GETDATE())

Problem occurs when i add a branch parameter (int) & make the following change
WHERE branch_code = @branch)
i get the following error message
Application uses a value of the wrong type for the current operation.

daw
3/15/2006 9:17:30 AM
Is branch_code actually defined as an int in your table?
Can you run (SELECT opened_date FROM
HOBISINT.account_statistics.dbo.t_branches WHERE branch_code = @branch) by
itself without an error?

[quoted text, click to view]
Tango
3/15/2006 3:39:27 PM
Yes it is int

yes i can run below without any errors

thanks for your interest

[quoted text, click to view]
AddThis Social Bookmark Button