#1  
Old 23rd January 2004, 12:30 AM
Ken Randall
 
Posts: n/a
Default Updating In-Memory Tables

The following works fine:

update "<XXX>"
set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=1)*100
where FundNo=1

However, I can't get this to work to do all Funds at once ast it times out:

update "<XXX>" X
set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=X.FundNo)
*100

Any help greatly appreciated.



  #2  
Old 23rd January 2004, 02:34 AM
Keith Johnson [NDX]
 
Posts: n/a
Default Re: Updating In-Memory Tables

"Ken Randall" <kenrandall@independentsoftware.co.uk> wrote in
news:400fc2a6@wic040d.:

> The following works fine:
>
> update "<XXX>"
> set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=1)*100
> where FundNo=1
>
> However, I can't get this to work to do all Funds at once ast it times
> out:
>
> update "<XXX>" X
> set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=X.FundNo)
> *100
>
> Any help greatly appreciated.



Hi Ken,

If you add an index to this Tempory Table for FundNo before doing the
query, does it work any better.?

eg..
CREATE INDEX ixFundNo
ON "<XXX>" (FundNo)



--
Keith Johnson [NDX]
  #3  
Old 23rd January 2004, 08:38 PM
Ken Randall
 
Posts: n/a
Default Re: Updating In-Memory Tables

It already has an index on it.

"Keith Johnson [NDX]" <keith{at}saxon.co.uk> wrote in message
news:Xns9478944576212Keithatsaxondotcodot@203.147. 131.213...
> "Ken Randall" <kenrandall@independentsoftware.co.uk> wrote in
> news:400fc2a6@wic040d.:
>
> > The following works fine:
> >
> > update "<XXX>"
> > set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=1)*100
> > where FundNo=1
> >
> > However, I can't get this to work to do all Funds at once ast it times
> > out:
> >
> > update "<XXX>" X
> > set Value=Value/(Select Sum(Value) from "<XXX" where FundNo=X.FundNo)
> > *100
> >
> > Any help greatly appreciated.

>
>
> Hi Ken,
>
> If you add an index to this Tempory Table for FundNo before doing the
> query, does it work any better.?
>
> eg..
> CREATE INDEX ixFundNo
> ON "<XXX>" (FundNo)
>
>
>
> --
> Keith Johnson [NDX]



  #4  
Old 23rd January 2004, 10:49 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Updating In-Memory Tables

> However, I can't get this to work to do all Funds at once ast it
> times out:


A similar query works for me, most likely you need to increase your timeout
value on the query component.

I am not 100% sure this query is what you want; would you mind explaining in
words what the query is supposed to calculate?

--


Eivind Bakkestuen [NDD]
Please, no email unless requested.
Search Borland and third-party newsgroups here: www.tamaracka.com





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory leak using class TnxPortalFileLog Hannes Danzl[NDD] nexusdb.public.support.portal 3 5th August 2010 02:31 PM
updating portal host on remote pc Peter Sanders nexusdb.public.support.portal 5 13th July 2010 09:33 PM
Updating a value of a byte array field sid25 nexusdb.public.support.odbc 1 25th October 2009 06:28 PM
How to convert MySQL tables over to NexusDb v2 tables? Brent nexusdb.public.support.thirdparty 12 29th August 2006 07:34 PM
ANN: NexusDB Memory Manager replacement Eivind Bakkestuen [NDD] nexusdb.public.announcements 0 16th January 2004 01:24 AM


All times are GMT +11. The time now is 12:38 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.