Dynamic SQL vs. Custom Query Function (1 Viewer)

DALeffler

Registered Perpetrator
Local time
Today, 04:56
Joined
Dec 5, 2000
Messages
263
What I’d like to do is offer the user a search function for strings that may be present in a table field.

I can think of two methods for doing this: using a dynamic query statement generated from code; or using a custom function call in a saved query.

From reading the experts on this board, I tend to think the method using a custom function call is better because of bloat issues: every time I run a code-generated SQL statement, the db bloats.

But then I need to pass to the custom function the user search terms and the table field to be searched, performing the same string manipulations for every record in the table.

The dynamic query, on the other hand, only requires one code generated SQL statement to run, but a different SQL statement for every time the user enters search terms.

Right now I’m thinking it’s 6 one-way and a half-dozen the other.

Your comments on how and why I should proceed one way or ‘ta other would be very much appreciated…
 

Users who are viewing this thread

Top Bottom