Solved

Multiplevel parameter using Splitlist error

Posted on 2011-03-23
2
612 Views
Last Modified: 2012-05-11
in my stored procedure i use splitlist.  but for some multiple selections it gives result. but if clicks select all it gives  error INVALID LENGTH PARAMETER  PASSED TO LEFT or SUBSTRING FUNCTION.

and (itemgroupid in (SELECT FieldName FROM SplitList(@itemgroupid,',')) and  (salesoriginid in (SELECT FieldName FROM SplitList(@salesoriginid,',')) and (CustomerCode in (SELECT FieldName FROM SplitList(@Cust,','))
and (dimension2_ in (SELECT FieldName FROM SplitList(@CC,','))
and (dimension3_ in (SELECT FieldName FROM SplitList(@Purpose,','))
0
Comment
Question by:AnnaJames77
2 Comments
 
LVL 16

Accepted Solution

by:
Imran Javed Zia earned 250 total points
ID: 35196911
It seems,  you are passing null or empty string, or make sure your parameter data is not ending or starting with "," comma.
Thanks
0
 
LVL 3

Assisted Solution

by:Emenizer
Emenizer earned 250 total points
ID: 35196919
Check this post on problems with this function: http://www.tek-tips.com/viewthread.cfm?qid=1563833&page=1
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now