avoid sql syntax error for spouts with zero items
Merge pull request #566 from niol/avoid-error-empty-spout

avoid sql syntax error for spouts with zero items