X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4229D9DD759 for ; Tue, 28 Mar 2006 12:43:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04848-01 for ; Tue, 28 Mar 2006 12:43:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.versaterm.com (smtp.versaterm.biz [216.208.41.121]) by postgresql.org (Postfix) with ESMTP id 859389DD730 for ; Tue, 28 Mar 2006 12:42:02 -0400 (AST) Received: from fay (unknown [198.73.216.184]) by smtp.versaterm.com (Postfix) with ESMTP id 0AC9470004 for ; Tue, 28 Mar 2006 11:41:47 -0500 (EST) From: "Fay Du" To: Subject: Update question Date: Tue, 28 Mar 2006 11:41:39 -0500 Message-ID: <00b801c65286$7ca8f260$b8d849c6@versaterm.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B9_01C6525C.93D2EA60" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.088 required=5 tests=[AWL=0.087, HTML_MESSAGE=0.001] X-Spam-Score: 0.088 X-Spam-Level: X-Archive-Number: 200603/445 X-Sequence-Number: 24791 This is a multi-part message in MIME format. ------=_NextPart_000_00B9_01C6525C.93D2EA60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all: I have a table like this: Table cost Id edge_id cost 1 30 101.4 2 30 null 3 40 500.2 4 40 null 5 45 300.7 6 45 null I want to set cost value with same edge_id by same value. The existing values are calculated by calling a function (calculate edge length). I can calculate the value by same function, but the function was slow. I wander if I can use update statement to set the second value with same edge_id. Thanks in advance for your help. Fay ------=_NextPart_000_00B9_01C6525C.93D2EA60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all:

 

I have a table like = this:

 

Table cost

Id  edge_id  =   cost

1       = 30       &nbs= p; 101.4

2       = 30       &nbs= p;  null

3       = 40       &nbs= p;  500.2

4       = 40       &nbs= p;   null

5        = 45       &nbs= p;  300.7

6        = 45       &nbs= p;   null

 

I want to set cost value with same edge_id by same value. The existing values are calculated by calling a function (calculate edge length). I can calculate the value by same function, but = the function was slow. I wander if I can use update statement to set the = second value with same edge_id. Thanks in advance = for your help.

 

Fay

 

------=_NextPart_000_00B9_01C6525C.93D2EA60--