Sponsored Content
Top Forums Shell Programming and Scripting Shell script matching similar records Post 302864269 by kashik786 on Wednesday 16th of October 2013 07:41:26 AM
Old 10-16-2013
Shell script matching similar records

hello all,
I have requirement to identify similar records matching about 80% to 90%.I have to black list customers with multiple accounts.
The data is in the Oracle Database, but is there any way I can get the data into flat file and compare the strings and fetch similar matching records?
I have one table with
Code:
id 
Name
middle_name
address
city

I need to pull out name and address fields similar. And spaces or slight difference can be ignored. I have tried within database methods which is very slow. And I have only basic knowledge of shell scripting need help for a way to get compared result faster. I have very large data to compare..more than 10 millions..

Last edited by Scrutinizer; 10-17-2013 at 04:47 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

update records in a file using shell script...

Hi, I have a file with 6 columns. First 3 columns together make unique record. I have a variable ($v) which hold a value that is obtained by a caliculaion. I have to replace value in 5th columnn with the value of the variable ($v). The value $v is caliculated from col4 and col6 values. ... (2 Replies)
Discussion started by: new_learner
2 Replies

2. Shell Programming and Scripting

need shell script to read particular records from a file

i am reading an i/p file input.txt as below and want to read all filenames as in highlighted in bold below and put them in a different file output.txt. can someone help me with a shell script to do this? thanks in advance regards brad input.txt --------- START TYPE:OPT INIT_SEQ:01... (8 Replies)
Discussion started by: bradc
8 Replies

3. Shell Programming and Scripting

shell script similar to the command HEAD

hello please if anyone can help me make a shell script similar to the command HEAD and TAIL THANKS (3 Replies)
Discussion started by: BELLA86
3 Replies

4. Shell Programming and Scripting

Help with shell script in formatting the records.

I have a text file in the following format. can any one please help me in printing the output in userfriendly format mentioned below. Input. 1) /ss/abc/1/w/s/domainname/abc1/logname/ ########error################### ########error################### ########error###################... (2 Replies)
Discussion started by: vinny81
2 Replies

5. Shell Programming and Scripting

script to return records which are not matching

file1 abcd efgh ijkl mnop file2 mnop qrst uvwx xyza file3 1234 4567 (8 Replies)
Discussion started by: rajivrsk
8 Replies

6. UNIX for Dummies Questions & Answers

Matching and reporting near-similar lines in a file

Hi, I have a file with the lines as below: C_10_A05_T7 C_10_A06_SP6 C_10_B05_SP6 C_10_B05_T7 C_10_B01_SP6 C_10_B01_T7 C_12_G07_SP6 C_12_G11_SP6 C_12_G11_T7 C_2_H18_T7 C_2_I02_SP6 C_2_I02_T7 C_2_I13_SP6 C_2_I17_SP6 The four segments of each line are connected by '_' symbols. I... (7 Replies)
Discussion started by: Fahmida
7 Replies

7. Shell Programming and Scripting

Shell script to print date and no.of records

hi all, i want script to print the output in the following format filename yyyy/mm/dd count where count= no.of records in the file Thanks in advance hemanthsaikumar (11 Replies)
Discussion started by: hemanthsaikumar
11 Replies

8. Shell Programming and Scripting

Join all the lines matching similar pattern

I am trying to Join all the lines matching similar pattern. Example ; I wanted to join all the lines which has sam to a single line. In next line, i wanted to have all the lines with jones to a single line....etc > cat sample.txt sam 2012/11/23 sam 2012/12/5 sam 2012/12/5 jones... (2 Replies)
Discussion started by: evrurs
2 Replies

9. Shell Programming and Scripting

Delete db records from shell script

Hello Mates, I would request your help in a shell script, simply I need to delete some matching db table records (rows) to ones in a given file: ------------------------------ #!/bin/bash SQL="delete from numberlist where msidn='';" MYSQL_USER="<your-user>"... (4 Replies)
Discussion started by: EAGL€
4 Replies

10. Shell Programming and Scripting

Shell script to filter records in a zip file that contains matching columns from another file

Not sure if this is the correct forum for this question. I have two files. file1.zip, file2 Input: file1.zip col1, col2 , col3 a , b , 0:0:0:0:0:c436:9346:d40b x, y, 0:0:0:0:0:880:39f9:c9a7 m, n , 0:0:0:0:0:80c7:9161:fe00 file2.txt col1 c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies
OCI_SET_CLIENT_INFO(3)													    OCI_SET_CLIENT_INFO(3)

oci_set_client_info - Sets the client information

SYNOPSIS
bool oci_set_client_info (resource $connection, string $client_info) DESCRIPTION
Sets the client information for Oracle tracing. The client information is registered with the database when the next 'roundtrip' from PHP to the database occurs, typically when an SQL statement is executed. The client information can subsequently be queried from database administration views such as V$SESSION. The value may be retained across persistent connections. PARAMETERS
o $connection -An Oracle connection identifier, returned by oci_connect(3), oci_pconnect(3), or oci_new_connect(3). o $client_info - User chosen string up to 64 bytes long. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Setting the client information <?php $c = oci_connect('hr', 'welcome', 'localhost/XE'); // Record the client information oci_set_client_info($c, 'My Application Version 2'); // Code that causes a roundtrip, for example a query: $s = oci_parse($c, 'select * from dual'); oci_execute($s); oci_fetch_all($s, $res); sleep(30); ?> // While the script is running, the administrator can see the client // information: sqlplus system/welcome SQL> select client_info from v$session; NOTES
Note Oracle version requirement This function is available when PHP is linked with Oracle Database libraries from version 10 g onwards. Tip Performance With older versions of OCI8 or the Oracle Database, the client information can be set using the Oracle DBMS_APPLICATION_INFO pack- age. This is less efficient than using oci_set_client_info(3). Caution Roundtrip Gotcha Some but not all OCI8 functions cause roundtrips. Roundtrips to the database may not occur with queries when result caching is enabled. SEE ALSO
oci_set_module_name(3), oci_set_action(3), oci_set_client_identifier(3). PHP Documentation Group OCI_SET_CLIENT_INFO(3)
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy