Searching into text files
Hi friends!
I'm working with Oracle8i and using ConText Cartridge to make
searches in some fields of a table. The problem is that this
table has a field to store a file name that contains large text.
This field has type VARCHAR(128). I don't know how to make
searches in this field. Can anybody help me, please?
Thank you all in Advance
Carlos Moreno
Hi friends!
I'm working with Oracle8i and using ConText Cartridge to make
searches in some fields of a table. The problem is that this
table has a field to store a file name that contains large text.
This field has type VARCHAR(128). I don't know how to make
searches in this field. Can anybody help me, please?
Thank you all in Advance
Carlos Moreno
Similar Messages
-
Is there a function to Search a Text File?
I am writing a program that will read data from a URL and then save that URL to a text file. I then need to be able to search the text file for certain strings and must know which line they appear on. I realize that I could read the text file in line by line looking for the string and then note the current line number. However, I need to search for 20-30 different strings in each URL and this would be very inefficient. I would really like some way to say:
int lineNumber = 0;
lineNumber = searchText("sometextfile.txt", str);
And have searchText return the lineNumber on which the String str was found. Alternately, if there is way to search a URL that would cut out the middle man of writing it to a text file first.
Any help would be greatly appreciated as I could not find this anywhere. Thanks.I have done something similar to to this, but it depends on what you want to use it for. I was looking for specific data on websites and would copy that data into a database. So, I used regex to find the data on the site and copy it. I also had to use String Tokenizer in certain places to get the correct data sometimes.
orozcom -
Searching a text file and printing the line if found!
Hi, Im fairly new to JAVA and have been googling this for hours and havent found any results that
have helped me...
Im looking to search a text file for a value that is in a that is delimited by colons
eg 45787 : 398948 : 398884 : 398984
IF that value is found I need to print this entire line and move it into a string.
I can work out the delimit part, the problem for me is a)searching the text file
and b) tell java to print that line only??
Any help would be very very much appreciated
Cheers
Jamespublic void printCourses() throws Exception
stuinput[] courseObjArray = new stuinput[10]; //Make sure this is the same as the ammount in the text
Scanner sc = new Scanner(new File("testfile.txt"));
int i=0;
boolean found = false;
while(sc.hasNextLine())
//Delimit this line with scanner
Scanner sc1 = new Scanner(sc.nextLine());
sc1.useDelimiter(":");
courseObjArray[i] = new stuinput(sc1.next(),sc1.next());
i++;
}//while
for(int i1 = 0;i1 < courseObjArray.length;i1++)
System.out.println(courseObjArray[i1].courseCode);
System.out.println(courseObjArray[i1].courseName);
System.out.println(courseObjArray[i1].courseName);
System.out.println("-----------------");
String courseCode2 = "courseObjArray[i1].courseCode";
if (courseCode2 == "12345")
System.out.println("working");
else{System.out.println("Not Found");}
}hmmm just wondering why could this method always return a "Not Found"....if the text file had a whole bunch of values like this
12345:Course1
12344:Course2
12343:Course3
isnt it surposed to return 1 "Working"?? because there is a 12345 in on of the line, in the semi colon delimited line with 2 values, one being the course code, one being the course name??
Given that there is 10 lines (from Array Object) -
Problem with data saving into text file
Hi,
The problem I am facing wihile saving the data into text file is that everytime when I am slecting the path from front panel, the data which is being saved is appended with the previous data, i.e. not only in the new text file, the new set of data is saved but also, if there is any previuos run for the program, the corresponding data is also present in that text file.
However, when I change the same 'control'(file path) to 'constant' in the block diagram, and add the file path, there is no such problem. Basically, changing the "File path" from constant in the block diagram to control (so that it is displayed in the front panel) is causing the problem.
Please help!
Thanks
Solved!
Go to Solution.
Attachments:
front panel.JPG 222 KB
Block Diagram.JPG 70 KB
Block diagram with File Path as Constant.JPG 74 KBYour shift register on the For loop is not initialized. It will retain the value of the string from the last time it executed. Initialize that and it should solve your problem.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
I have to average data of 1min and then log into text file
For my application i have to average data of 1min and then log into text file. please guide me on this . To transfer the data i am using notifier.
Prashant Soni
LabVIEW Engineerhi prashant,
Check this attachment..I just implemented my idea in this one.
Thanks and regards,
srikrishnaNF
Attachments:
Example_VI_BD.png 12 KB -
Spool SQl data into text file using dynamic sql
Hi,
I am spooling output data into text file using command
select 'select t.mxname,bo.lxtype,t.mxrev'||chr(10)||'from mx_1234567'||chr(10)||
'where <condition>';
here mxname varchar(128),lxtype(128),mxrev(128) all are of varchar type.I want the output in format
e.g Part|1211121313|A
but due to column width the output,I am getting is with spaces.
"Part then blank spaces |1211121313 then blank spaces |A"
how can I remove these spaces between columns.I used set space 0 but not working.
Thanks in advance.
Your help will be appreciated.Hi Frank,
I have seen your reply for SET LINE SIZE function. But, I could not be able to understand it.
I am facing similar kind of issue in my present project.
I am trying spool more than 50 columns from a table into flat file. Because of more column lengths in few columns, i am getting space. There are so many columns with the same issue. I want to remove that space.so that, data can fit perfectly in one line in .txt file without any wrap text.
Below is my sample query.sql. Please let me know the syntax. My mail id : [email protected]
--Created : Sep 22,2008, Created By : Srinivasa Bojja
--Export all Fulfillments
--Scheduled daily after 1:00am and should complete before 3:30am
WHENEVER SQLERROR EXIT SQL.SQLCODE
SET LINESIZE 800
SET WRAP OFF
SET PAGESIZE 800
SET FEEDBACK OFF
SET HEADING ON
SET ECHO OFF
SET CONCAT OFF
SET COLSEP '|'
SET UNDERLINE OFF
SPOOL C:\Fulfillment.txt;
SELECT SRV.COMM_METHOD_CD AS Method,
SRV.SR_NUM AS "Fulfillment Row_Id",
CON.LAST_NAME AS "Filled By"
SRV.SR_TITLE AS Notes,
SRVXM.ATTRIB_04 AS "Form Description"
FROM SIEBEL.S_SRV_REQ SRV,
SIEBEL.S_SRV_REQ_XM SRVXM,
SIEBEL.S_USER USR,
SIEBEL.S_CONTACT CON
WHERE SRV.ROW_ID = SRVXM.PAR_ROW_ID AND
SRV.OWNER_EMP_ID = USR.ROW_ID AND
CON.ROW_ID= SRV.CST_CON_ID;
SPOOL OFF;
EXIT; -
Downloading ...into text file
hii Friends,,,,
i want to download report program into text file and its includes into seperate text file without using function modules.I want to do it with CL_GUI_FRONTEND_SERVICES and readreport.
Kindly halp me or send any sample code???
Regards Mandeep.Hi Mandeep Singh,
The solution is simple press the button PATTERN or press CTRL + F6.
That gives you a pop up.
Select radio button "ABAP Object Patterns"
Press Enter.
In Call Method radio button.
Type "CL_GUI_FRONTEND_SERVICES" in Class/Interface.
<b>Select the METHOD of your choice by pressing F4 in the box Method.</b>
This should solve the query.
Reward Points if useful.
Thanks,
Tej.. -
Sql query o/p into text file using 11g
i am using 11g. i want to write the result of the query into text file.how to do it
Hi if you are using SQL*plus then try with SPOOL command or if your are using TOAD then you can export the result of the query into a file of your choice. example Excel cheet or text file.
just right click on the result in your toad window and there will be a option of export result to a file. -
Is it possible to export the out put of Crystal report into text file?
Hi All,
Is it possible to export the out put of Crystal report into text file?Hi
Yes, Go to File --> Export --> Export Report --> Under Format select TEXT & select the destination as "Disk file"(defaultly selected)
Give the proper details as per your requirement for "Characters per inch" & "Number of lines per page" & click on 'OK"
In "Choose Export file" window, select the destination folder & provide file name. click on "SAVE"
Regards
Ashwini -
How to save data results into text file
I want to solve an equation of degree 2 for example, and results are displayed in a text file
Like many other software coding forums, we don't want to give hand outs. We are more than happy to give hand ups. Show that you've tried to figure out the problem and show us where you are stuck. Then we will be glad to help you get you unstuck. If we just give you an answer, you will learn nothing.
As far as writing to a text file, look in the File I/O palette for the Write to Text File primitive. Also, if you go to Help->Find Examples... and do a search for "text file" you will get some examples of how to use it.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Is there any way to download smartform into text file
is there any way to download smartform into text file
Hi,
No you cant save a smart form into text file but you can store it in a XML file.
Goto menu Utilities --> select More Utilities --> select Upload/Download --> click Download and give the path to save the backup for smartform.
Now you smartform is saved to XML file at your PC.
Also you can upload this smartform.
Hope this helps you.
Regards,
Tarun -
Hi all,
I want to export table data into a delimeted text file with SQL*Plus.
[edit]
Sorry, non delimited text file
[edit]
Example:
CREATE TABLE delim (
col_a VARCHAR2(20),
col_b VARCHAR2(40)
value stored in
col_a = FISH_1
col_b = FISH_2
spool x:\test_1.lst
set feedback off;
set HEADING off;
set pagesize 0;
set linesize 60;
select col_a, col_b
from table delim;
spool off;
=>
FISH_1
FISH_2
When I now do the same with
set linesize 62;
the reslut is like this
=>
FISH_1 FISH_2
In the output of the second example there is a blank between col_a and col_b.
I have to export the column data without this one blank between columns.
Is there any way to do this?
Thanks and cheers,
ben
Message was edited by:
ben512Well in your example there is one space between the two columns, anyway you can see in my previous example that there is a set colsep and that show what you want.
But here is another example:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> create table test (
2 col_a VARCHAR2(5),
3 col_b VARCHAR2(3)
4 );
Table created.
SQL>
SQL> insert into test (col_a, col_b)
2 values('abc', 'FA');
1 row created.
SQL>
SQL> insert into test (col_a, col_b)
2 values('def', 'KL');
1 row created.
SQL> insert into test values ('12345','123');
1 row created.
SQL> rem if you don't want to have a space between the two columns then
SQL> set head off
SQL> set colsep ""
SQL> select col_a, col_b from test;
abc FA
def KL
12345123
SQL> rem if you want to have one space between the two columns then
SQL> set colsep " "
SQL> select col_a, col_b from test;
abc FA
def KL
12345 123
SQL> -
Search the text file using vbscript.
Hi I have some data in my text file. Below is the content. Now I need to search the file whether it contains identityType as ApplicationPoolIdentity. Any help in vbscript???
name:"example"
queueLength:"1000"
autoStart:"true"
enable32BitAppOnWin64:"false"
managedRuntimeVersion:"v2.0"
managedRuntimeLoader:"webengine4.dll"
enableConfigurationOverride:"true"
managedPipelineMode:"Integrated"
CLRConfigFile:""
passAnonymousToken:"true"
startMode:"OnDemand"
[processModel]
identityType:"ApplicationPoolIdentity"
userName:""
password:""
loadUserProfile:"false"ok my solution is below,
CONST ForReading = 1
Dim File1
Dim FileToRead
Dim strLine
Dim infoResult
Dim strDir, objFile, returnvalue
strDir = "C:\Scripts\"
File1 = "sample.txt"
FileToRead = strDir & File1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(FileToRead, ForReading)
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
if instr(strLine, "identityType") <> 0 then
if instr(strLine, "LocalSystem") <> 0 then
infoResult = "Found"
exit do
end if
else
infoResult = "Not Found"
end if
Loop
objFile.Close
Wscript.Echo infoResult
Set objFSO = Nothing
Set objFile = Nothing -
Hi all,
I'm thinking about how to implement a binary sort to get,given a key, a value from a text file with a list of words in order. I saw randomaccessfile for j2se and I know that this work it's usually done by seek functions but how to do the seek work without the File class , with only the InputStream and Reader? I'm talking about the j2me midp 2 cldc 1.1 api, is there some methods or class to use for this thing? How could be implemented a binary search in a text file resident in the /res dir or the JAR or which could be the problems that cannot make possible this staff? If there was something like seek one way could be that one of decide a common length of words to read so going to the half of the text file it's possible with simply multiplication, and the do the binary search things.But for now I haven't found any resources or help.
I hope you can help me to understand, thank youHallo all,
it is NOT the problem to locate the text I need to find in the fmb, or fmx.
The problem is that since I want to change not only the text but also some more code around I want to do this in Form Builder - Object Navigator. And I'm not able to discover in which trigger or procedure the text appears.
I do not want to edit fmx, or fmb in a text editor because I suupose theer are some checksums hidden for the format.
-duro
BTW in FMT there is no code seen (only some binary) for v6i as it was in v4.5. -
Output folder contents into text file
Hello, everyone.
I am new to automator, and I'd like to learn how to use it. Recently, someone asked me if there was a way that they could select a folder and somehow dump the filenames of all items in that folder (non-recursively) to a text file. It seems to me that this is the sort of thing that Automator would be able to do. Can anyone give me some tips on how I might go about doing this?
I also figured this might be possible with a custom bash command. I am more experienced with bash and Unix command line, so if there is a better option there, please let me know. I just figured I would check here first.
Thanks!That does work, but the only problem is that the folder who's contents are being exported will be different every time. (I see now that I didn't specify that in my first post). Ideally, he would either be given an option to select a folder to read, or he would just be able to drag and drop the folder onto an application (or into terminal) and have it perform this task.
Maybe you are looking for
-
I have an external hard drive that I have been using for years. All of a sudden my mac will not recognize the external as a "save as" device location. But the external does show up on my desktop and I can open it to drag and drop items. What happe
-
Right thumbnail, wrong images
I'm using iMovie 11 (9.0.2) on a 2010 MBP with 500GB of hard drive and 8GB RAM. I sat down this weekend to put together a video for a friend - ten minutes of scanned stills and ripped-from-DVD videos with a separate narration track. I did it in 10 se
-
[ADF] One Skin, Multiple Applications
Hi, I was wondering what the "best practice" is to have one skin for multiple applications. Ideally I'd like to be able to make a tiny change in the main skin and it changes the look and feel for many apps. Is that even possible? I'm using standalone
-
can any one give me any good object in ale /idocs and BAPI and explain them (senario where that is used and why and how . i will give you maximun reward points if i can understand that.
-
Close popup window from loaded movie
I have an html link which launches a flash movie into a separate html window. The flash movie then loads another movie into level 10. from this level, I am trying to close the flash movie and its associated html page using the code:- javascript:windo