Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL Language Quick Reference

RE: SQL Language Quick Reference

From: Graeme Farmer <graeme.farmer_at_mincom.com>
Date: Tue, 15 Jun 2004 09:58:31 +1000
Message-ID: <DA5B390A2CBAA64AB2367C2EDA3210F60CA656A0@tqxbneclu03.root.tequinox.com>


Something that grew out of a desire to play with Oracle Text, I created context indexes in Oracle which have indexed all the Oracle 8i, 9i, 10g pdfs and a host of whitepapers as well and searching across all Oracle documentation is as simple as running a basic query!! The results are returned immediately and ranked according to the number of references found.

Very helpful when you know what you're looking for but not sure which doc it's in.

All that's required is

Install Oracle Text schema

CREATE DIRECTORY orapdf AS '<path to docs>';

BEGIN
  ctx_ddl.create_preference('ORAPDF','FILE_DATASTORE');   ctx_ddl.set_attribute('ORAPDF','PATH',''); END;
/

drop table orapdf;
create table orapdf (docid number, pdf varchar2(255));

insert into orapdf values (1,'/docs/oracle/9.2.1/concepts.pdf');
insert into orapdf values (2,'/docs/oracle/9.2.1/admin_guide.pdf');
insert into orapdf values (3,'/docs/oracle/9.2.1/admin_guide_unix.pdf');
insert into orapdf values (4,'/docs/oracle/9.2.1/admin_guide_win32.pdf');
...
...
commit;

create index orapdf_idx01 on orapdf (pdf) indextype is ctxsys.context
parameters ('datastore ctxsys.file_datastore filter ctxsys.inso_filter')
/

and then a simple query like:

column document format a100
column version format a12
select
  score(1) rank,
  substr(pdf,instr(pdf,'/',1,3)+1,instr(pdf,'/',1,4)-instr(pdf,'/',1,3)-1) version,
  'acroread' reader,
  pdf document
from gfarmer.orapdf
where contains(pdf,'&&1',1) > 0
order by score(1) desc
/

output is like:

sys_at_gfprd> @orasrch 'pctfree'

      RANK VERSION READER DOCUMENT

---------- ------------ --------
----------------------------------------------------------------------------
------------------------
       100 9.2.0        acroread /docs/oracle/9.2.0/olap_users_guide.pdf
       100 9.2.0        acroread /docs/oracle/9.2.0/error_messages.pdf
       100 9.2.0        acroread /docs/oracle/9.2.0/concepts.pdf
...
...
Elapsed: 00:00:00.01

Then I cut and paste the reader and document and then perform a search in the document.

Adding new docs is as simple as an insert into the tables and resync of the index:

BEGIN ctx_ddl.sync_index('GFARMER.ORAPDF_IDX01'); END;
/

Indexing is very CPU intensive and can take some time, but it pays off pretty quickly!!

Cheers,
Graeme.

-----Original Message-----
From: Michael Thomas [mailto:mhthomas_at_yahoo.com] Sent: Tuesday, 15 June 2004 1:59 AM
To: oracle-l_at_freelists.org
Subject: RE: SQL Language Quick Reference

Hi,

I've found a combination that makes reading docs (e.g. pdf) a pleasure on my laptop.

  1. Get a laptop with at least a 15in diagonal screen and resolution of 1280x800. The screen quality makes a big difference.
  2. Use Acrobat where you can use the "Note Tool" to save comments in the pdf files. With the navigation panel on the left, you can tab to "comments" and flip back and forth between different notes just like book tabs.
  3. Pdf also provides the option to search, one document at at time, while "off-line" from the internet. I wish I knew a way to do "off-line" search the Oracle html documentation like you can at: http://otn.oracle.com/pls/db92/db92.homepage But, my laptop is not a very powerful html (nor pdf) search engine. :-)

When I know what I'm searching for and select the correct pdf, then its better than flipping pages. But, if I'm generally lost then the html search of Oracle documentation is the fastest way to get good doc details for a specific Oracle version.

HTH. Regards,

Mike Thomas


Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


-- 
This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Limited unless expressly stated otherwise.

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Jun 14 2004 - 18:55:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US