|
Log in | ||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
"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
|
|||
|
|||
|
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
|
|||
|
|||
|
> 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 | |
|
|
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 |