473,395 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Compare and Update or Drop and Reload?

I have a file from a vendor in XML:

Expand|Select|Wrap|Line Numbers
  1. <Item>
  2.     <company>Stuff</company>
  3.     <UPC>876543210123</UPC>
  4.     <prod_cd>M-PRODUCT         </prod_cd>
  5.     <descrip>This thing has some describable charicteristics               </descrip>
  6.     <brand xml:space="preserve">                    </brand>
  7.     <color>CLR </color>
  8.     <size>8   </size>
  9.     <price>24.0000</price>
  10.     <MSRP>72.0000</MSRP>
  11.     <stockLevel>Y</stockLevel>
  12.     <image_name>http://DOMAIN/FOLDER/FILE.jpg</image_name>
  13.     <image_name_lg>http://DOMAIN/FOLDER/FILE-large.jpg</image_name_lg>
  14.     <lastupdate>2011-07-07T19:35:28.257-07:00</lastupdate>
  15. </Item>
  16.  
I would like that file to land in a folder each day and be used to update a table in a SQL 2000 table. The program will use the file, I guess in terms of a datatable as an interface between the data and the DB, to add new entries, update changed entries (as any of that data can change between days), and if the entry is no longer present change the <stockLevel /> to an "N".

Am I stuck looping through the database table comparing every record or is there a process that already exisits for achieve this in a quicker and easier(on the DB) mannor? Then again, would it be better to drop the table each time and create a new one from the file?

Plus I would need to trim all the extra white space that is included in the data. Is there a way to do that across an entire Datatable with out looping, or possibly while pulling the data from the file into the datatable?

Thanks!
Jul 13 '11 #1
0 1166

Sign in to post your reply or Sign up for a free account.

Similar topics

66
by: Ellinghaus, Lance | last post by:
> > Other surprises: Deprecating reload() >Reload doesn't work the way most people think >it does: if you've got any references to the old module, >they stay around. They aren't replaced. ...
7
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an...
1
by: pmelanso | last post by:
Hello, I have a drop down list which is dynatically loaded from a database and I have a second drop down list that is also dynatically loaded depending on what is selected in the first drop down...
2
by: jake johnson | last post by:
I'm running PG 7.4.1 on FreeBSD 5.2.1_RC1 and experienced a general 40% drop in performance after increasing Shared mem buffers to 2000 (from the 1000 default setting) and the Sort Mem to 1024 from...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
10
by: rcamarda | last post by:
I have created a table that contains buckets to hold activitives of enrollment for each of our admissions officer for each day of an enrollment session. I have an UPDATE that builds rolling totals...
4
by: Prof | last post by:
Hi, I have the requirement of autoupdating the drop down lists , when a selectin is done in another drop down box. I dont have a server through which i can make it dynamic. I have to hard code...
12
by: azegurb | last post by:
I have table in Javascript and it has addrow, deleterow, submit, and functions. when i click it automatically adds new row and it has select option to choose some of them for ex. in added two rows...
2
by: bikashliju | last post by:
hi, i am facing a problem while practicing php. i am working a demo hr management system ....if a new record is added to database then the drop down list to show employee id will be updated...
4
by: George Best | last post by:
Hi everyone, I am trying to make three dynamic drop down lists. When I say dynamic I mean when I choose a value from the first one, the second one changes options and when I choose a value from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.