a little conversion problem. . .

From: JT Kirkpatrick <jt-kirkpatrick(at)mpsllc(dot)com>
To: "'pgsql-sql(at)hub(dot)org'" <pgsql-sql(at)hub(dot)org>
Subject: a little conversion problem. . .
Date: 1999-07-01 18:18:44
Message-ID: 01BEC3CC.A2260D20.jt-kirkpatrick@mpsllc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hello all! i thought someone on this list might have trained their brain
cells more than me. . .

i have two tables -- one with a field called autoinv int4 that represents a
service record, and another table with a field vinvnum varchar(20) that
represents a vendor invoice number. if we had a subcontractor perform
service, his/her vinvnum will be the same as the service record number
(autoinv in the other table). i'd like to compare those two fields, and
where they are equal i'd like to update another field (for all practical
purposes, a field in the first table mentioned above with autoinv in it)
with the value of -1. here is what i tried:

update table1 set fieldtobeupdated = -1 where text(table1.autoinv) =
table2.vinvnum;

exhausts memory every time. closes back-end. no way jose' (sorry mr.
soares -- you have to have heard that too many times!). would it work if i
used varchar(text(table1.autoinv))?? or
text(table1.autoinv)=text(table2.vinvnum)? i thought i'd ask here first
before i tried -- if it bombs i bring 20 people and the business to its
knees, and have to re-start postmaster. . .

thanks for any help you can provide! jt kirkpatrick / mpsllc.com

Browse pgsql-sql by date

  From Date Subject
Next Message Fomichev Michael 1999-07-01 20:37:39 Re: [SQL] DISTINCT on multiple fields (fwd)
Previous Message Matthew Hagerty 1999-07-01 17:00:23 DISTINCT on multiple fields