Re: dynamic sql or not? that is the question

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/08/08
Message-ID: <398FFEA7.75A2_at_yahoo.com>#1/1


John T wrote:
>
> I am not a PROC or SQL wizard but I believe that the only way to accomplish
> what I want is dynamic sql. I am developing a PROC application with 8.0.5.
> My program is being passed a list of keywords to search for. I am trying to
> look up titles of documents based on the number of hits on the keywords. If
> I was writing the sql myself it would look something like:
>
> select id, count(id) from keywords
> where keyword like 'keyword1%' or keyword like 'keyword2%' ...or keword like
> 'keywordn%'
> group by id
> order by count(id) desc;
>
> From my understanding of PROC, I need to use method 4 to generate the
> dynamic where clause. Am I nuts and can someone give me an example?
>
> Also, I will then need a dynamic sql statement that looks like:
>
> Select * from titles where id in (list from above query).
>
> Thanks in advance for your help.
>
> --John
> jlt1_at_mediaone.net

This may be of use...

http://www.jlcomp.demon.co.uk/plsqltab.html

Cheers

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Tue Aug 08 2000 - 00:00:00 CEST

Original text of this message