Intermedia text (oracle text) and excel
Hi,
is it possible to index just one single sheet instead of the whole excel-workbook in
oracle text? Or is it possible to name just one sheet (e.g. table1) in a 'contains'
query? Additionally, is it possible to searc for the number of occurences of a term
within one document (i.e. excel-sheet)? Thanks for your help in advance.
Best Regards,
Dan
Hi Dan,
is it possible to index just one single sheet instead of the whole excel-workbook in
oracle text? No
Or is it possible to name just one sheet (e.g. table1) in a 'contains'
query?No
Additionally, is it possible to searc for the number of occurences of a term
within one document (i.e. excel-sheet)? Thanks for your help in advance.I am not sure at the moment, maybe with some kind of rankin.
The problem is the the INSO-filter converts the excel file to a html file and oracle is reading this generated file. And in file there is no information about excel sheets.
Regards,
Thomas
Similar Messages
-
Multi data providers (oracle DB and Excel file) in one BO report
I have to create one BO report. There is one Excel file, with Type, type_ID,(each type has many different type_ids), eg
type type_id
IHEI IHEI121
IHEI IHEI132
IHEI IHEI212
IHDI IHDI511
IHDI IHDI232
IDWU IDWU212
IDWU ...............
now I want to count the occurrences of these type_ids in the oracle database.
This should be relatively easy, with
select type, type_id, count(type_id)
from my_table
where type in ('IHEI', ...)
however, since the there are many more data in the database than in the Excel file, it will also count those type_ids that are not in the Excel file
So, how to get rid of those type_ids and keep only those coming from the Excel file?
thanks for your help!Hi Eric,
In the main report, bring in your table.field(s) etc.
Then create a sub report and hook it up to the Excel file.
Link the sub to the main and display (...by "Type" ? ...)
all the Type_ID's.
Happy Hunting,
The Panda -
Automatic comparision of Oracle view and excel
I don't know if this is the right forum for this question, but if anyone has any idea kindly share it.
We have oracle database 11g, there is a database view, and there is an excel(from another source), one of our departments wants to compare the one column in this view(ex:-empno) and the excel(empno).
They want to upload this excel and wants the result to be automatically generated, i.e empno existing in view not in excel and vice versa.
how can we acheive this,
if its not possible to automatically upload, if i upload it from backend would this logic work with oracle discoverer or any other oracle softwareYou may create an external table to see the excel file data, and then you may also join them to your existing database tables.
Regards
Karan -
Oracle text installed but can't find anything through the text indexes
Hello,
i've got a Oracle 10G (10.2.0.4) database 64bit on a Windows 2003r2 64bit (sp2). I also installed the Oracle Text:
Oracle Text
VALID 10.2.0.4.0
then I created some preferences and created the text indexes:
create index afindex on docs(document) indextype is ctxsys.context parameters('storage gdoc_store SYNC (ON COMMIT)');
so with the syn on commit, it should immediately be seen in the index.
I have for example in 1 table 6 documents (word,pdf ...), the other has more then 64000 documents and the 3rd one more than 425000.
In none of the 3 above, searching on text gives result after index is created. Not in the developer his program nor in sqlplus.
searching sql for example:
select id from docs where contains(doc,'hello')>0;
under the c:\windows\temp, I see about 380files with drgibXXXXX, so it does index them?
What could be the problem?
note that I've got lots of other database where I also use Oracle text and there is no problem, only difference is the 32 <-> 64bit.
error in ctx_index_error is :
DRG-11207: user filter command exited with status 1
Edited by: user12155961 on 15-apr-2010 5:33According to the [http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/afilsupt.htm#sthref2446|10.2 docs], Auto Filter is supported on the following platforms:
Microsoft Windows
o Server 2003 (x86 and IA-64)
o XP (Service Packs 1 and 2)
o 2000 x86 (Service Pack 2)
o NT 4.0 x86 (Intel) (Service Pack 6a)
Sun Solaris 8.0 and 9.0
HP-UX 11.0 and 11i, PA-RISC
HP-UX 11i v11.23, IA-64
IBM AIX 5.1 and 5.2L
Red Hat Linux 7.3 and 8.0
Red Hat Enterprise Linux AS 2.1 and 3.0 (x86)
Red Hat Enterprise Linux AS 3.0 (IA-64)
SuSE Linux Standard Server 8 (x86)
Note x84 and IA-64 (Itanium 64) but not x86-64. So I suspect that you don't get the filters at all.
If this is the case, your options are either to install a 32 bit version of Oracle for Windows (which I believe should work fine on 64 bit Windows) or to attempt to cobble the 32 bit ctxhx into your 64 bit environment. I'm sure this should be possible, but it would be unsupported and I don't have any kind of "how to" on doing it. -
Using Oracle Text to search through WORD, EXCEL and PDF documents
Hello again,
What I would like to know is if I have a WORD or PDF document stored in a table. Is it possible to use Oracle Text to search through the actual WORD or PDF document?
Thanks
DougYes you can do context sensitive searches on both PDF and Word docs. With the PDF you need to make sure they are text and not images. Some scanners will create PDFs that are nothing more than images of document.
Below is code sample that I made some time back to demonstrate the searching capabilities of Oracle Text. Note that the example makes use of the inso_filter that is no longer shipped with Oracle begging with Patch set 10.1.0.4. See metalink note 298017.1 for the changes. See the following link for more information on developing with Oracle Text.
http://download-west.oracle.com/docs/cd/B14117_01/text.101/b10729/toc.htm
begin example.
-- The following needs to be executed
-- as sys.
DROP DIRECTORY docs_dir;
CREATE OR REPLACE DIRECTORY docs_dir
AS 'C:\sql\oracle_text\documents';
GRANT READ ON DIRECTORY docs_dir TO text;
-- End sys ran SQL
DROP TABLE db_docs CASCADE CONSTRAINTS PURGE;
CREATE TABLE db_docs (
id NUMBER,
format VARCHAR2(10),
location VARCHAR2(50),
document BLOB,
CONSTRAINT i_db_docs_p PRIMARY KEY(id)
-- Several notes need to be made about this anonymous block.
-- First the 'DOCS_DIR' parameter is a directory object name.
-- This directory object name must be in upper case.
DECLARE
f_lob BFILE;
b_lob BLOB;
document_name VARCHAR2(50);
BEGIN
document_name := 'externaltables.doc';
INSERT INTO db_docs
VALUES (1, 'binary', 'C:\sql\oracle_text\documents\externaltables.doc', empty_blob())
RETURN document INTO b_lob;
f_lob := BFILENAME('DOCS_DIR', document_name);
DBMS_LOB.FILEOPEN(f_lob, DBMS_LOB.FILE_READONLY);
DBMS_LOB.LOADFROMFILE(b_lob, f_lob, DBMS_LOB.GETLENGTH(f_lob));
DBMS_LOB.FILECLOSE(f_lob);
COMMIT;
END;
-- build the index
-- Note that this index differs than the file system stored file
-- in that paramter datastore is ctxsys.defautl_datastore and not
-- ctxsys.file_datastore. FILE_DATASTORE is for documents that
-- exist on the file system. DEFAULT_DATASTORE is for documents
-- that are stored in the column.
create index db_docs_ctx on db_docs(document)
indextype is ctxsys.context
parameters (
'datastore ctxsys.default_datastore
filter ctxsys.inso_filter
format column format');
--search for something that is known to not be in the document.
SELECT SCORE(1), id, location
FROM db_docs
WHERE CONTAINS(document, 'Jenkinson', 1) > 0;
--search for something that is known to be in the document.
SELECT SCORE(1), id, location
FROM db_docs
WHERE CONTAINS(document, 'Albright', 1) > 0; -
Is Oracle Text and InterMedia one and the same?
Hi,
In short are they the same and which one is the latest of them.
Thanks in advance.They are not the same. In earlier versions, the term InterMedia included the Text stuff, but they have since been separated. Currently, Text is the stuff with words in it, like documents and Intermedia is the non-word stuff, like pictures and videos.
-
Differences between oracle text in enterprise and express editions
are there any differences between oracle text features found in express edition and ent. edition. if so what are they?
There is a list of features available in the online documentation. The only thing that it mentions as being missing from Oracle Text are the english and french knowledge bases. There isn't any Intermedia or Ultra Search or Data Mining. Here is a link to the 10g Express Edition features guide:
http://download-west.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm#BABDDIAE
There is a separate discussion group for 10g Express Edition, that requires a separate free registration:
Oracle Database Express Edition (XE)
There is a thread on this subject in the 10g Express discussion group:
Oracle Text
The above thread includes the following quick comparison:
If it's not in Standard Edition One, it is not in Express Edition. (Therefore everything that is in Enterprise but not in Standard Edition, is also not in Express Edition. That includes all EE-only options.)
If it requires Java in the database, it is not in Express Edition.
Other than that, it's mainly the size limits: 1 CPU (no parallel processing), 1 GB RAM, and 4 GB user-related tablespaces. -
Oracle Text/Intermedia issue
Hi Friends,
To implement search capabilities in my oracle database, iam trying to install and configure intermedia. While doing this i came across a few issues:
1. In Our current setup we wish to use Oracle intermedia. All we need is to be able to create ctxsys.context index and query our tables using CONTAINS keyword. Do we need to install Oracle intermedia for this or Oracle Text is enough or these two are tied together?
2. After intermedia install, I found that 4-5 tables with names DR$indexname are created. Do we need to take into account any memory allocation issues while creating this index(ctxsys.context )?
3. Also the query takes longer time to retrieve results. What are the considerations to optimize the query? (The table that I am querying has about 5000 records and I created ctxsys.context index for two fields of sizes varchar2(4000) and varchar2(2000) )
Any help on this wd be highly appreciated.
Thanks in Anticipation.
Deeps1. In Oracle 9i you need only Oracle Text, no need to install Intermedia
2. Yes and you can control in which tablespace you want to create this table. You can control this when creating the datastore (Please double check about datastore as I don't remember exactly where to specify the storage clause)
3. This is difficult to answer unless we have more details like tables, query and execution plan etc. But in general you should analyze the table and indexes as well. Are you using fuzzy, soundex, stem or % search? -
I wish to use VBA and Excel to programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the code view of these files, save and close them.
I have 5000 associations between Find: x0001 and Replace: y0001 in an Excel sheet.
I have the VBA written but do not know how to open, close and save the code view of the ####.html files. Please ... and thank you...
[email protected]This is actually the code view of file ####.html that I wish to find and replace programmatically where #### is a four digit number cataloguing each painting.... In 1995 I thought this was clever... maybe not so clever now :>)) Thank you for whatever you can do Rob!
!####.jpg!
h2. "Name####"
Oils on acrylic foundation commercial canvas - . xx X xx (inches) Started
Back of the Painting In Progress </p> </body> </html>
Warmest regards,
Phil the Forecaster, http://philtheforecaster.blogspot.ca/ and http://phils-market.blogspot.ca/ -
Identifying text file names and importing on single Excel sheet
Hey!
Does anybody can help me with Excel VBA macro code in order to import data from text files into single Excel spread sheet? I want to create User Form where user can select start and end date of interest and macro code will import
bunch of text files depending on user demands...
My text files are named: 20130619004948DataLog.txt (meaning: yyyy mm dd hh mm ss). Text file contains recordings for each 15 seconds... It would be great to omit time tail (meaning that user can only specify date). Text files for one day of interest (I have
text files covering whole year):
20130619004948DataLog.txt
20130619014948DataLog.txt
20130619024948DataLog.txt
20130619034948DataLog.txt
20130619044948DataLog.txt
20130619054948DataLog.txt
20130619064948DataLog.txt
20130619074948DataLog.txt
20130619084948DataLog.txt
20130619094948DataLog.txt
20130619104948DataLog.txt
20130619114948DataLog.txt
20130619124948DataLog.txt
20130619134948DataLog.txt
20130619144948DataLog.txt
20130619154948DataLog.txt
20130619164948DataLog.txt
20130619174948DataLog.txt
20130619184948DataLog.txt
20130619194948DataLog.txt
20130619204948DataLog.txt
20130619214948DataLog.txt
20130619224948DataLog.txt
20130619234948DataLog.txt
Option Explicit
Sub SearchFiles()
Dim file As Variant
Dim x As Integer
Dim myWB As Workbook
Dim WB As Workbook
Dim newWS As Worksheet
Dim L As Long, t As Long, i As Long
Dim StartDateL As String
Dim EndDateL As String
Dim bool As Boolean
bool = False ' to check if other versions are present
StartDateL = Format(Calendar1, "yyyymmdd")
EndDateL = Format(Calendar2, "yyyymmdd")
' I am using Userform asking user to select the date and time range of interet,
' However, I want to use only the date to filter the files having the name with that particular date
file = Dir("c:\myfolder\") ' folder with all text files
' I need assistance with the following part:
'1) How to filter and select the files between StartDateL and EndDateL_
'(including files with that dates as well)?
While (file <> "")
If InStr(file, StartDateL) > 0 Then 'Not sure if the statements inside parenthesis is correct
bool = True
GoTo Line1:
End If
file = Dir
Wend
Line1:
If Not bool Then
file = "c:\myfolder\20130115033100DataLog.txt" 'Just for a test that the code works as intended
End If
'This part for the selected text files to be loaded on a single Excel Sheet.
Set myWB = ThisWorkbook
Set newWS = Sheets(1)
L = myWB.Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row
t = 1
For x = 1 To UBound(file)
Workbooks.OpenText Filename:=file(x), DataType:=xlDelimited, Tab:=True, Semicolon:=True, Space:=False, Comma:=False
Set WB = ActiveWorkbook
WB.Sheets(1).UsedRange.Copy newWS.Cells(t, 2)
t = myWB.Sheets(1).Cells(Rows.Count, "B").End(xlUp).Row + 1
WB.Close False
Next
myWB.Sheets(1).Columns(1).Delete
Application.ScreenUpdating = False
Rows("1:1").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End Sub- Make a new Excel file
- Open the VBA editor
- Add a Userform
- Place 2 text boxes and 1 command button on that form
- Paste all code below into the code module of the form
- Download this file:
https://dl.dropboxusercontent.com/u/35239054/FileSearch.cls
- In the VBA editor press CTRL-M and import that file
- Save the Excel file in the directory that contain your text files
- Run the form
You can format the columns of the sheet as you like, e.g. column E:H should be a number with 5 decimal places. The top row can contain some headings. My code did not affect the formatting or the headings.
Andreas.
Option Explicit
Private Sub UserForm_Initialize()
'Just a sample
Me.TextBox1.Value = FormatDateTime(Now, vbGeneralDate)
Me.TextBox2.Value = FormatDateTime(Now, vbShortDate)
End Sub
Private Sub CommandButton1_Click()
Dim StartDate As Date, EndDate As Date
Dim FS As New FileSearch
Dim R As Range
Dim ThisFile As Variant
Dim ThisDate As Date
Dim Data As Variant
Dim Count As Long
'Be sure we have 2 dates
If Not IsDate(Me.TextBox1.Value) Then
Me.TextBox1.SetFocus
MsgBox "No start date"
Exit Sub
End If
If Not IsDate(Me.TextBox2.Value) Then
Me.TextBox2.SetFocus
MsgBox "No end date"
Exit Sub
End If
'Convert to real dates
StartDate = CDate(Me.TextBox1.Value)
EndDate = CDate(Me.TextBox2.Value)
'Time part given?
If Fix(EndDate) = EndDate Then
'No include all files for this day
EndDate = EndDate + TimeSerial(23, 59, 59)
End If
'Correct order?
If StartDate > EndDate Then
ThisDate = EndDate
EndDate = StartDate
StartDate = ThisDate
End If
With FS
'Same path as our file
.LookIn = ThisWorkbook.Path
.FileName = "*DataLog.txt"
'Search all files sort by file name
If .Execute(msoSortByFileName, msoSortOrderAscending) = 0 Then
MsgBox "No data files found in " & .LookIn
Exit Sub
End If
'Clear previous data
Set R = Range("A2").CurrentRegion
If R.Row < 2 Then Set R = R.Offset(1)
R.ClearContents
'Show the user that we are working
Application.Cursor = xlWait
DoEvents
For Each ThisFile In .FoundFiles
'Get the date from the file name
ThisDate = Filename2Date(ThisFile)
'Between our dates?
If (ThisDate >= StartDate) And (ThisDate <= EndDate) Then
'Import at the end of the data
Set R = Range("A" & Rows.Count).End(xlUp).Offset(1)
Data = ReadCSV(ThisFile)
R.Resize(UBound(Data) + 1, UBound(Data, 2) + 1) = Data
Count = Count + 1
End If
Next
End With
'Done
Application.Cursor = xlDefault
If Count = 0 Then
MsgBox "No files match your dates"
Else
MsgBox Count & " files imported"
'Hide the form
Me.Hide
End If
End Sub
Private Function Filename2Date(ByVal Fullname As String) As Date
'Convert e.g "C:\20130601142648DataLog.txt" to the date "01.06.2013 14:26:48"
Dim i As Long, j As Long
i = InStrRev(Fullname, "\")
If i > 0 Then Fullname = Mid(Fullname, i + 1)
Fullname = JustNumbers(Fullname)
If Len(Fullname) <> 14 Then Exit Function
Filename2Date = _
DateSerial(Mid(Fullname, 1, 4), Mid(Fullname, 5, 2), Mid(Fullname, 7, 2)) + _
TimeSerial(Mid(Fullname, 9, 2), Mid(Fullname, 11, 2), Mid(Fullname, 13, 2))
End Function
Private Function JustNumbers(ByVal What As String) As String
'Return only numbers from What (by Rick Rothstein)
Dim i As Long, j As Long, Digit As String
For i = 1 To Len(What)
Digit = Mid$(What, i, 1)
If Digit Like "#" Then
j = j + 1
Mid$(What, j, 1) = Digit
End If
Next
JustNumbers = Left$(What, j)
End Function
Private Function ReadCSV(ByVal Fullname As String) As Variant
'Read a CSV file into an array
Const LDelim = vbCrLf 'Line delimiter
Const FDelim = ";" 'Field delimiter
Dim hFile As Integer
Dim Buffer As String
Dim Lines, Line, Data
Dim i As Long, j As Long
'Be sure the file exists
If Dir(Fullname) = "" Then Exit Function
'Open and read all data
hFile = FreeFile
Open Fullname For Binary Access Read As #hFile
Buffer = Space(LOF(hFile))
Get #hFile, , Buffer
Close #hFile
'Split into lines
Lines = Split(Buffer, LDelim)
'Split the first line and prepare the output
'Note: I assume that all lines have the same number of fields
Line = Split(Lines(0), FDelim)
ReDim Data(0 To UBound(Lines), 0 To UBound(Line))
For i = 0 To UBound(Lines)
Line = Split(Lines(i), FDelim)
For j = 0 To UBound(Line)
'Parse the fields
If IsDate(Line(j)) Then
Data(i, j) = CDate(Line(j))
ElseIf IsNumeric(Line(j)) Then
Data(i, j) = CDbl(Line(j))
Else
Data(i, j) = Line(j)
End If
Next
Next
ReadCSV = Data
End Function -
Index rules in oracle text and query using matches
Dear All,
I would like to ask about rules and matches function in oracle text.
I followed an example in oracle text application developer's guide.
I have a rule table like this :
1 oracle
2 larry or ellison
3 oracle and text
4 market share
then, I create an index to that table. This is needed for calling matches function. Here is the syntax :
create index queryx on queries(query_string)
indextype is ctxsys.ctxrule;
then, I noticed that the result on DR$QUERYX$I table as follows :
LARRY 0 2 2 1 (BLOB)
MARKET 0 4 4 1 (BLOB) {MARKET} {SHARE}
ORACLE 0 1 1 1 (BLOB)
ORACLE 0 3 3 1 (BLOB) {TEXT}
ELLISON 0 2 2 1 (BLOB)
What I want to ask is why doesn't the words 'share' and 'text' appear in the DR$QUERYX$ table?
When we use matches function, it then search on the index result and consequently it wion't find the 'share' word. so when for example I do query like this :
select query_id from queries where matches(query_string,' It only share ten percent of all products sold')>0
it will give 0 result since the no word in ' It only share ten percent of all products sold' was in index table. But actually it could possibly be categorized as the 4 category which rules is 'market share'
I tried this in a larger set of data and get same result.
Here is my generated rules from my document collection :
1 {REQUIREMENTS} & {ELICITATION}
1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} & {PLACED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} & {UNNECESSARY}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} ~ {UNNECESSARY} & {MISUSE}
1 {INTERPRETATION} ~ {REQUIREMENTS}
2 {DESIGN} & {REPRESENTATION}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} & {GRASP}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} ~ {GRASP} & {MANY} & {LAYER}
2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
3 {PM} & {TESTING} & {ATTRIBUTI}
And this is the index table result with ctxrule :
(only the token_text column shown)
PM
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
INTERPRETATION
so when I try to classify a document with the word ouline inside it, it should produce category 1 (based on the rules) but since there are no word 'outline' in index tabel, the matches will return 0 means that the document is not classifiedto any category. I don't understand why it happen. Anybody knows about this? I would really appreciate any help.
Thank you very much.Hm, I see. It do make sense. so nice to know.
But then in the second example I gift where I used larger table, as shown below :
Here is my generated rules from my document collection :
1 {REQUIREMENTS} & {ELICITATION}
1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
1 {INTERPRETATION} ~ {REQUIREMENTS}
2 {DESIGN} & {REPRESENTATION}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
3 {PM} & {TESTING} & {ATTRIBUTI}
As far as I know, the sign ' ~ ' means 'OR' and '&' means 'and' . So based on the 4th line in my table :
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
it can be concluded that if any of the words stated there been queried, so the category '1' will appear as a result. But then before we can use 'matches' to query it, we need ti create index for the rules table . I did it and the result were :
(only the token_text column shown)
PM
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
INTERPRETATION
there were no words other than PM, DESIGN< REQUIREMENTS and INTERPRETATION. Why the words REQUIREMENTS, ELICITATION, ACTOR, FURPS, OUTLINE don't appear in the index result? -
Hello
Tried the Oracle White Paper - Oracle Text Web Applications
Created the table and populated with relevant url links
create table htmldb_documentation(
id number,
doc_title varchar2(4000),
doc_url varchar2(4000))
then created the index
create index htmldb_doc_ctxidx on htmldb_documentation(doc_url)
indextype is ctxsys.context
parameters ('datastore CTXSYS.URL_DATASTORE')
Then ran my SQL for the report in Toad and APEX SQL Workshop>SQL Commands before creating an APEX Region based on a SQL Report
select score(1) relevance, doc_title, doc_url
from htmldb_documentation
where CONTAINS (doc_url, :P1_SEARCH, 1) > 0
order by 1 desc
After running the APEX Report I get error
report error:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 1
I also ran these grant commands after I received this error
grant ctxapp to demo;
grant execute on ctx_cls to demo;
grant execute on ctx_ddl to demo;
grant execute on ctx_doc to demo;
grant execute on ctx_output to demo;
grant execute on ctx_query to demo;
grant execute on ctx_report to demo;
grant execute on ctx_thes to demo;
grant execute on ctx_ulexer to demo;
Any ideas ?? I'm running APEX 3.1.0.00.32 on Oracle 10.2.0.1 on WindowsXP
If I replace the bind variable :P1_SEARCH, with a literal value the error disappearsCouple of things to check:
1) do you have an item called P1_SEARCH in your application?
2) If so, make sure that it has a value; otherwise, Oracle Text gets confused and will throw that error.
You may want to consider using a PL/SQL Function Returning SQL Query that will only append the CONTAINS clause if P1_SEARCH has some value.
Thanks,
- Scott -
http://sumnertechnologies.com
http://spendolini.blogspot.com -
How to output strings to an text file and excel file
Hi guys,
I am writing a simple application taht process some string inputs from user using a simple GUI. The GUI consists of a series of
textfields which the user can enter names, age, addresses....etc
Once they complete filling up that GUI form, they click SUBMIT. All the values will then be read. These strings are then required to be output to 2 files
1. To a text file which I can open it and read it anytime I wish.
2. To an excel file which follows a specific format. That is, all names will be written to column B, all ages will be written to column C...etc
The programme is expected to keep running allow the user to enter details of multiple persons(some 300 sets of data of different persons) until he clicks on End program.
Please advise how I can output the strings to
1. Text file
2. Excel file.
Many many thanks. I need this for one of my project which is due so so soon...... :((
Regards
David1. Text file
See link to "Documentation - Tutorials" on the left
side of this page.
2. Excel file
Dont try to write the real excel format (if you want
to do it soon).
- write data to a plain text file.
- Use tab stops for separation of values.
- Name file as excel file. (*.xls)
If you double click this file, excel will import data
and insert it to a table in the right order by
itself.
Excel can save this as real .xls now.
Anyone here with a better idea? (Try to learn by
myself)good thing to know for the excel tip :)
thx -
Oracle Text and MINUS character
Hi all,
I have following problem:
- I have created a Oracle Text Index on the VARCHAR2 column:
BEGIN
ctx_ddl.create_preference('SUBSTRING_PREF','BASIC_WORDLIST');
ctx_ddl.set_attribute('SUBSTRING_PREF','SUBSTRING_INDEX','TRUE');
END;
CREATE INDEX IDX_TEXT_1 ON MY_TABLE
(COLUMN1)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('wordlist SUBSTRING_PREF memory 50m')
NOPARALLEL;- I execute the following SELECT:
SELECT mt.*
FROM MY_TABLE mt
WHERE contains(mt.COLUMN1, 'test%') > 0;It returns all records where the column1 contains the entry "test" + something else.
BUT the records where column1 contains the entries "my-test" + something else or "owr-test" + something else, a.s.o.
It should return only the records with "test" + something else entries.
How can I change the Index or query to achieve it?
Best regardsBy default, the hyphen is treated as a break character and the words on either side are indexed as separate tokens. To change this behavior, you can create a lexer, set the printjoins attribute of the lexer to include the hyphen, then use that lexer in your index parameters. Then, strings of characters containing a hyphen will be indexed as one token, including the hyphen. Please see the example below.
SCOTT@orcl_11gR2> CREATE TABLE my_table (column1 VARCHAR2(60))
2 /
Table created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO my_table VALUES ('test')
3 INTO my_table VALUES ('testing')
4 INTO my_table VALUES ('my-test')
5 INTO my_table VALUES ('owr-test')
6 SELECT * FROM DUAL
7 /
4 rows created.
SCOTT@orcl_11gR2> BEGIN
2 ctx_ddl.create_preference('SUBSTRING_PREF','BASIC_WORDLIST');
3 ctx_ddl.set_attribute('SUBSTRING_PREF','SUBSTRING_INDEX','TRUE');
4 CTX_DDL.CREATE_PREFERENCE ('test_lex', 'BASIC_LEXER');
5 CTX_DDL.SET_ATTRIBUTE ('test_lex', 'PRINTJOINS', '-');
6 END;
7 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> CREATE INDEX IDX_TEXT_1 ON MY_TABLE (COLUMN1)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS
4 ('wordlist SUBSTRING_PREF
5 LEXER test_lex
6 memory 50m')
7 NOPARALLEL
8 /
Index created.
SCOTT@orcl_11gR2> SELECT token_text FROM dr$idx_text_1$i
2 /
TOKEN_TEXT
MY-TEST
OWR-TEST
TEST
TESTING
4 rows selected.
SCOTT@orcl_11gR2> SELECT mt.*
2 FROM MY_TABLE mt
3 WHERE contains (mt.COLUMN1, 'test%') > 0
4 /
COLUMN1
test
testing
2 rows selected. -
Is it possible to create an index on a view as opposed to a table, when using Oracle Text?
Thanks for the earlier response.
I was also loooking at Oracle Ultra Search. I figured out that Ultr search provides out of the box query application to do free-form text search, parameterized search and so on....
I also read that Oracle Ultra search uses Oracle text as the underlying technology to do the search.
I have a requirement where most of my searches will be on structured data spread across multiple tables. But I also have a requirement to index some static content which resides on the file system.
Is it possible to mix and match query results i.e. first perform a search on the structured data and then perform another search on the static document data and then megre results from both and display back to the user?
Thanks for the help
Maybe you are looking for
-
Safari can't open certain web pages?
There are certain webpages, such as my credit report AMEX site that will open up in Windows and not on a MAC (using Safari, or Firefox). When I click on a button nothing happens or I get a blank page.
-
Don't understand error message.
Update: I'm looking for any ideas on this. I know it's hard without the full script. I'm more than happy to send it to you, but it is over 450 lines. All of the database functions work fine, as does an earlier version of this script from which there
-
Can set any IP on ACS 4.0 SE - accept the one I need
We are trying to upgrade from an ACS 3.2 for Windows server to our new ACS 4.0 SE box. We have upgraded the Windows box to 4.0, backed up the configuration and restored it to the new box. We have pointed a couple of clients to the new box for testing
-
Flex Component Kit for Flash CS3
Hi, I created a flex component using the component kit for Flash CS3. The component contains a vector image wrapped as a MovieClip. In my flex application I add the component as child to a Canvas. It works well if i add it like - <mx:Canvas id="conta
-
ITunes Locks up when I try to play a video
I have purchased a few TV shows from the iTMS. Historically they have worked fine. I rented a movie a couple of days ago. I went to watch it and iTunes locked up after playing about 2 seconds of audio. I have done the following trying to fix the prob