Unix Technical Forum

stored proc question.

This is a discussion on stored proc question. within the MySQL General forum forums, part of the MySQL category; --> I have a string ("word word bob jack") such that I want to pass to the store proc as ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 05:48 AM
Gary W. Smith
 
Posts: n/a
Default stored proc question.

I have a string ("word word bob jack") such that I want to pass to the
store proc as a single entity,
split it in the store proc, and do a specific action for each word. Any
advice on how to do this? There is more going on that just that single
word so multiple calls isn't practical and they string will have N+1
elements so setting up a number of parameters is impractical (since the
word count may be as many as 1000).

Like a foreach statement?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 05:48 AM
Gary W. Smith
 
Posts: n/a
Default RE: stored proc question.

> I have a string ("word word bob jack") such that I want to pass to the
> store proc as a single entity,
> split it in the store proc, and do a specific action for each word.
> Any
> advice on how to do this? There is more going on that just that

single
> word so multiple calls isn't practical and they string will have N+1
> elements so setting up a number of parameters is impractical (since

the
> word count may be as many as 1000).
>


I was able to create a loop based on the instr function and while.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com