Garayed.com  

Go Back   Garayed.com > mySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-2008, 11:03 PM
wayne
 
Posts: n/a
Default Is it possible to pass a where clause to a stored procedure?

Create Procedure GetUserInfo( inGroupID Int, inExtraInfo
VarChar( 32 ) )
Begin
Select FName, LName, Address,... From Personel p
Where ( inGroupID = 0 or p.GroupID = inGroupID )
And ( Length( inExtraInfo ) = 0 Or inExtraInfo )
Order by LName,FName;
End;

*** Note - How do I get the engine to use the content of inExtraInfo
for example if I wanted to pass in
a birthday as part of the where clause. I am trying not to use
"pure" dynamic sql.


Any help will be appreciated.
Wayne


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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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



All times are GMT. The time now is 08:18 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.