Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anaylor01
Starting Member
28 Posts |
Posted - 2007-12-27 : 11:03:06
|
Problem #1. In Reports if you add a parameter and select multi-value when I run the report and Select All from the drop down list or if I select more than one value I get "incorrect syntax near ','. I haven't been able to find anything on this error. I am running Sql Server 2005 SP2. Problem #2. In Microsoft Access I can add a Combobox that will return a list of values from a table and will let me assign a sort order. When the form is loaded there is no value for combobox. The user can leave this value blank. What I like to do is write code that says if the combobox is null then select all. When I try to do this in VB.net the form loads the combobox with values already in the combobox. How can I either fix problem #1 or #2 or both? Thanks for your help.Happy holidays. |
|
Will H
Yak Posting Veteran
56 Posts |
Posted - 2007-12-27 : 12:22:21
|
If I'm understanding you correctly, you aren't processing the multi-value stuff correctly in your WHERE Clause. It isn't a simple [WHERE field = @param] or [WHERE field in (@param)], because the multi-valued parameter is sent as a comma separated string. The best thing to do is take the string and dump it into a temporary table variable through a function. See this:http://en.csharp-online.net/Building_Reports_in_SQL_Server_2005%E2%80%94Working_with_Multivalued_Parameters---------------------------------------------------------SSRS Kills Kittens. |
 |
|
|
|
|