in reply to Re^2: String Search
in thread String Search
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: String Search
by kallol.chakra (Initiate) on Aug 31, 2009 at 10:12 UTC | |
Hi, I am giving you the original data and programme.
The output generates : The output not generating the required output.. This is like : value1,value2... Please help.. | [reply] [d/l] |
by Marshall (Canon) on Aug 31, 2009 at 11:33 UTC | |
First, I would say: WRONG approach. This CDR database is extremely likely to be a pretty darn fancy thing that understands SQL queries (probability approaches 1.0). Perl is fantastic at DB and SQL stuff. That is the right approach for what you need. Forget this text dump of a complex OO DB! Start thinking about how to connect to this server with the CDR records and what questions you would like to ask it. Perl can connect to SQL DB's and get that job done extremely well! Go do some homework about (a) what you want to know, (b) simple SQL syntax, (c) run some queries from your terminal at the UI level, then come back and ask about how Perl can make magic happen with that process.
Summary: | [reply] |
by kallol.chakra (Initiate) on Aug 31, 2009 at 12:31 UTC | |
Hi Marshall, Thanks a lot for your king help. But I have already thouht that approach also. The logic I had thought as Find the data and insert the data into table But some problem will arise for that. 1. The database we are using as Oracle Database. 2. The table where I will insert the data is very big table and there will lacs of files where every file may be have 1000 records , so it will take hugh time to load into database. 3. Better approach I think SQL*Loader. Because perl is very useful to format the data into "," separated file and SQL*Loader always very fast to load data into table. Your Help is reqired here | [reply] |
by Marshall (Canon) on Aug 31, 2009 at 14:14 UTC | |
by kallol.chakra (Initiate) on Sep 01, 2009 at 06:17 UTC | |
| |
by Anonymous Monk on Aug 31, 2009 at 10:38 UTC | |
| [reply] |
by kallol.chakra (Initiate) on Aug 31, 2009 at 10:20 UTC | |
The print part I have commented.. | [reply] |
by Anonymous Monk on Aug 31, 2009 at 13:06 UTC | |
close(INPUT_FILE); and you should be able to use one while to do all parsing and extract the values with regular expressions for example, inside the first while In this case the regular expression is extended to extract the values inside quote symbols You're using global variables, I'd recomend you to use strict mode "use strict;" it will force you to define the scope of the variables, having global variables creates lots of parsing errors, i.e.: first record has a gSMCallReferenceNumber node so it loads variable $callIdentificationNumber with that value, if the following record ( or any of the following cdr records) don't have gSMCallReferenceNumber node and as $callIndentificationNumber is global you will have variable loaded with previous value. | [reply] [d/l] [select] |
by kallol.chakra (Initiate) on Sep 01, 2009 at 06:37 UTC | |