should really have a primary key, even if it's a compound key of a few cols,
it's a mathematical pain in the ass for the database otherwise.

Max

At 11:46 15/03/2002 -0800, Mark Warrick wrote:
>There is no primary key.
>
>A "primary key" is formed by comparing all 15 columns
>of data with all 15 columns of data being imported.
>
>Got any other suggestions?
>
>---mark
>
>--- Stephen Garrett <[EMAIL PROTECTED]> wrote:
> > Off the top of my head:
> >
> > o Create a temp table with same structure as end
> > result table
> > o bulk insert into temp table
> > o Write A SP
> >  - user a cursor, loop thru all records in original
> > table
> >   - For each row, select from Temp the base matching
> > row
> >     (assumes there is a primary key)
> >   - in the SP compare the columns of each selection
> >   - if at least one does not match, break out early
> > and
> >   - perform an update on the current row for all
> > fields
> >     (variation is to update as you go)
> >
> > And of course the other variation is to write a
> > custom C or VB app
> > that reads the temp and origin tables into memory,
> > does all of the
> > compares, sets flags as to what has to be updated,
> > then updates
> > all of the rows as needed.
> >
> >
> > Anyway, those are my thoughts...
> >
> > Steve
> >
> >
> > At 11:02 AM 3/15/2002 -0800, Mark Warrick wrote:
> > >Hello All,
> > >
> > >I have a database of about 85,000 records which has
> > 15
> > >columns.  I need to update this database with a
> > >datafile that contains the same schema and just as
> > >many records.
> > >
> > >For each row that is going to be imported, I have
> > to
> > >compare all 15 columns of data for each row against
> > >all 15 columns of each row in the database to see
> > if
> > >there's a match, and if not, then import the new
> > data.
> > >
> > >Every query I've written with ColdFusion to do this
> > >seems to kill the server.  Even comparing one row
> > of
> > >data seems to put extreme load on the server.
> > >
> > >Anyone got a clue as to how I might accomplish this
> > >goal?  I may be willing to pay somebody to do this.
> > >
> > >---mark
> > >
> > >
> > >__________________________________________________
> > >Do You Yahoo!?
> > >Yahoo! Sports - live college hoops coverage
> > >http://sports.yahoo.com/
> > >
> >
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to