Thanks Mosh

This is what I am using:

This update Query is not working. After seven hours of hard work my hard
drive has stopped making the horrible grinding sound.

The Result:   None of the records were updated. Can someone please help.

I am trying to update price field in Table named Product with values from
field newprice in Table named New. The primary key in both the tables is
dealerpart no (Text) which is unique.
Note: All the records need to be updated
<CFQUERY name="UpdatePrice" Datasource="XYZ">
Select New.newprice,New.dealerpartno,New.publisher,
Product.publisher,Product.dealerpartno,Product.price
>From New,Product
</CFQUERY>


<cfloop query="UpdatePrice">
Update Product
SET Product.price= #UpdatePrice.newprice#
WHERE Product.dealerpartno = #UpdatePrice.dealerpartno#

</cfloop>

Note: There are 20000 records in both the tables.

Thanks
Srimanta
----- Original Message -----
From: "Mosh Teitelbaum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 08, 2002 7:28 PM
Subject: RE: Time Required for Updating DB


> Like (I think) Isaac said, there's probably something wrong with the code,
> but it's kind of hard to tell for sure without looking at the code.
>
> I apologize if this is obvious, but since you didn't really explain the
> particulars of the situation, I wanted to make sure that you weren't
> inadvertently making this harder than need be.  Does the situation allow
for
> you to update the column via a single UPDATE query as in:
>
> UPDATE fooTable
> SET barColumn = barColumn + 1
>
> If so, this will be infinitely quicker than having to perform 1 UPDATE
query
> per record.
>
> --
> Mosh Teitelbaum
> evoch, LLC
> Tel: (301) 625-9191
> Fax: (301) 933-3651
> Email: [EMAIL PROTECTED]
> WWW: http://www.evoch.com/
>
>
> > -----Original Message-----
> > From: Srimanta [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 07, 2002 8:47 PM
> > To: CF-Talk
> > Subject: Time Required for Updating DB
> >
> >
> > Hi
> > I am having trouble updating a fairly small size database with
> > approx 20000
> > records.
> > Size in MB is approx 18 MB. Type Access 2000.
> >
> > I am updating one particular column, in all the rows with CF
> > Query and Loop
> > tags.
> > First the program generates : Bad Allocation Error complaining of
Virtual
> > memory shortage.
> > I have 256 MB Ram Windows 2000 Server Pentium III 999 MZ Processor.
> >
> > When I increased the Virtual memory size the update seems to be
> > going on for
> > ever!!!
> > Its exactly 5 hours plus now its running.
> > How much time does similar updates take?? Any ideas ??
> > I have not done this before.
> >
> > Srimanta
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to