Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to database

Status
Not open for further replies.

kb2001

MIS
May 22, 2006
31
US
I'm using cygwin in a windows network. I have extracted data from files via gawk and now have a tab delimited file containing a numerical value and a regional identifier. I need to export those to a MSSQL database. I have no idea how to use PERL at all. Can someone point me towards a command to read up on that acomplishes this task?

file is as such, but format can easily be changed (duh)

123456 REGION
234567 REGION
etc...

Thanks
 
I don't think you need perl at all, check this out in the MSSQL forum, you should be able to import data into MSSQL in a CSV format

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
That's how we've been doing it. I'm trying to automate the process as much as possible. I have a script running that checks for new error messages every 10 minutes. When one comes up, I run my gawk script to gather data, then use DTS to import it to the DB. As this system rolls out for more regions, the current process becomes unreasonably time-consuming. I'd rather run one command to run the entire process, or have it completely automatic with only a log file to let me know what has occurred.

Is perl the right choice for this? Or should I be looking at VBScripting as its a MSSQL database?
 
No, Perl will do it fine

Check out the DBD::ODBC module on you'll be there in no time

HTH

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thanks Paul-

I am definitely finding what I need here. I appreciate the direction.

Kevin
 
You're welcome ;-)

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top