Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Updating existing records from external file

$
0
0
Hi,

I know how I want to do this but am puzzled as to how I can achieve it in BD.

Essentially I need to take some information from a CSV or Excel file and use that to update fields in existing records. There doesn't seem to be any built-in facility to do this so assume I need to run a script. I think I know what this needs to do:

1. Select set of records that are to be updated
2. Read the first line of the csv file and store the column values in separate variables
3. Find the record with the matching unique identifier and select it
4. Update the relevant fields in that record with the new data
5. Move on to the next line of the csv file ... and so on

I'm a bit stumped now though. I can see there is a Read File action but that it seems is only able to dump the entire file into a single variable. There is the parser facility but that seems only able to create new records. If anyone could point me in the right direction that would be great.

Cheers

Matty

Viewing all articles
Browse latest Browse all 13329

Trending Articles