Jump to content

table data with updated timestamp


jd0000

Recommended Posts

I'm trying to create a table where I have information about a computer -- for example -- name, ip, memory, hd size. I scan client computers daily to get a report of their info which i put into a csv, then i run a script to convert that csv into SQL statements to update my database as needed. I want to only update rows where information has changed -- mainly because i need to have an "updated" timestamp on the table, so another script can look at the table and only select rows updated after timestamp XX.

 

The problem is, since I am just parsing a csv file to create the INSERTS, i dont know if the exact data already exists in the table. I could do it differently where I do selects for each set of computer data to see if its there, but with 2000+ computers, that would take forever.

 

Any suggestions on how to work this out?

 

Thanks!

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.