Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

Multiplevel parameter using Splitlist error

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
AnnaJames77
Asked:
AnnaJames77
2 Solutions
 
Imran Javed ZiaCommented:
It seems,  you are passing null or empty string, or make sure your parameter data is not ending or starting with "," comma.
Thanks
0
 
EmenizerCommented:
Check this post on problems with this function: http://www.tek-tips.com/viewthread.cfm?qid=1563833&page=1
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now