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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE

Status
Not open for further replies.

Baukep

Programmer
Sep 28, 2006
44
0
0
NL
Hello,

My problem is the following (apart from being a newbie):

I'm trying to get all my banktransactions (from csv-files from my bank) into MySQL (5.0.33). I managed to do that. Now I have to update the 'target'-base because some fields don't have the right values (ie INC should be changed to Incasso and 087xxxxxxx should be 87xxxxxxx)
I tried to make a 1 query that updates all the fields (columns) I want, but thats not working. I can write multiple queries that each change a value but all those queries should be run twice every month.
So, but i'm not sure, I thought this was something to do as stored procedure. Am i right or is there a better way?

If so I have to read about stored procedures and try to figure out how to work with them.
But first of all I have to know if 'stored proc.' are the way to handle this.

Thanks in advance

Bauke
 
Yes, a sequence of statements is a procedure. If you repeat the sequence then it is convenient to store the procedure.

If you are using a tool to import the csv data into the database, the tool may have some builtin functions to accomplish some of the transformations you are doing with UPDATEs. That is worth looking into.

 
Thanks for the info!
Back to the books ;-)

Bauke
 
Alternatively if the updates need to be doine when the data is imported, look also at implementing triggers for on insert, and call teh stored procs from teh triggers. this way you won't have to run them manually anymore.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top