Google Groups Home
Help | Sign in
Dynamic where clause help please
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
wayne  
View profile
 More options Jul 22, 7:56 pm
Newsgroups: comp.databases.mysql
From: wayne <wa...@pacsaware.com>
Date: Tue, 22 Jul 2008 16:56:01 -0700 (PDT)
Local: Tues, Jul 22 2008 7:56 pm
Subject: Dynamic where clause help please
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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google