| | |
Create a perl script for string matching
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Solved Threads: 0
Hi All,
I am currently trying to create a perl script that takes sql statement that is stored within text files and add up the frequency for that sql statement in that text file and store the sql statement and the no of frequency in another file.
Below is a sample of the sql statement that i would be capturing.
SELECT F_PRODUCT.BUILDING, F_PRODUCT.TESTER, PEDB.Name, PEDB.Email, T1.Name AS PLMName, T1.Email AS PLMEmail, PEDB_1.Name AS QREName, PEDB_1.Email AS QREEmail,
The thing is, there's too much variety to do a efficient pattern matching on these statements.
So would it be possible to first add a " in front of each statement and a " at the back of each statement, and then by using " " as a delimiter i can take whatever sql statement that is found between two ", and use that to compare to other statements in the line to get the frequency and finally storing that statement along with it's no of frequency on another text file.
If you know of any better way or if there's already actual program/scripts that does that, pls advise.
Thank you for your time and attention.
I am currently trying to create a perl script that takes sql statement that is stored within text files and add up the frequency for that sql statement in that text file and store the sql statement and the no of frequency in another file.
Below is a sample of the sql statement that i would be capturing.
SELECT F_PRODUCT.BUILDING, F_PRODUCT.TESTER, PEDB.Name, PEDB.Email, T1.Name AS PLMName, T1.Email AS PLMEmail, PEDB_1.Name AS QREName, PEDB_1.Email AS QREEmail,
The thing is, there's too much variety to do a efficient pattern matching on these statements.
So would it be possible to first add a " in front of each statement and a " at the back of each statement, and then by using " " as a delimiter i can take whatever sql statement that is found between two ", and use that to compare to other statements in the line to get the frequency and finally storing that statement along with it's no of frequency on another text file.
If you know of any better way or if there's already actual program/scripts that does that, pls advise.
Thank you for your time and attention.
![]() |
Similar Threads
- Execute Unix commands from Perl script (Perl)
- Horspool Algorithm for String Matching (C++)
- How to call a perl script in the C# app? (C#)
- I get the error no file or directory when i try to run a perl script (Perl)
- perl script help re: scope/structure for noob (Perl)
- Log file rotation script (Perl)
- On execution of perl script, popup asks if i want to save or run this file (Linux Servers and Apache)
- Calculate the amount of time in the linux process using perl script (Perl)
Other Threads in the ASP Forum
- Previous Thread: how to flag a value other than accepted one
- Next Thread: login tutorials ?
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





