RE: Dynamic query inside the stored procedure
Posted in 1999
Unless it's been added to 7.3x you can't do this. But you can get your SPL
to generate more SPL and then execute that.
Paul Watson #
WF Software Ltd # If it ain't broke
Tel: +44 1463 674729 # Fix it until it is
Fax: +44 1463 678729 #
www.wfsoftware.com #
> Hi guys
>
> I am trying to write a dynamic query inside a stored
> procedure and
> try to execute that . I don't have any idea about If u guys know
> anything about that kindly share the knowledge with me , it would be
> grateful. Actually what i want is
>
> select * from <table_name> where <fld1> = param1 {or|and}
> <fld2> = param2 {or|and} <fld3> = param1 ......>
> This "or" and "and" vary from time to time . Basically i
> want write a
> dynamical select statment inside the stored procedure and to execute
> the same.
>