View Single Post

   
  #7 (permalink)  
Old 02-28-2008, 10:26 AM
Jerry Stuckle
 
Posts: n/a
Default Re: store and evaluate query

sasi wrote:
> i cannot use views as it doesn't provide any placehold to subtitute
> args passed from commandline.
> copy/paste will work, not a good idea when many people use.
>
> i am looking for some way simillar to,
> call query1 <arg1> <arg2>
> or
> eval query1 <arg1> <arg2>
>
> can i return a query values from procedures?
>
> say for example, if i want to return the output of this query (select
> c1,c2 from t1 where c1 = "str1") from a procedure, how to do it?
>
> pseudo code or any idea welcome
>
> thanks
> Sasi
>
>
>
>
>


No, you can't evaluate a query like you want.

You can, however, pass 'c1' to a SP and have it perform the select for you.

But if you're talking multiple tables joined together (a typical
example), you could still use a view - just join the tables in your view
and pass your WHERE clause to the view.

Maybe if you post a real query you're trying to do it would help.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote