It would appear that a table variable is being populated based on a While Loop. The While Loop is based on the comma separated values that come in the @Search variable. The @Haku variable contains the "element" of the @Search string that is currently being worked on.
Personally, I'd split the @Search string using a decent non-looping splitter and do the whole stored rocedure as a single, set-based query (single query does not always constitute set-based).
--Jeff Moden
Change is inevitable... Change for the better is not.