MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2012

SQL Update Multiple Fields from Different File



fixed

This stuff drives me crazy. With this SQL statement:

UPDATE michael/strmstp a SET (a.stm#d, a.stm#e) =
(select b.stm#d, b.stm#e
from michael/strmstpfd b WHERE a.ststr = b.ststr
and b.stm#d <> ' ' and b.stm#e <> ' ')

I'm getting a Null values not allowed in column or variable STM#D.

I know there is a one to one relationship between the two tables. I
also know that many records in both files

If I do this:

SELECT * FROM michael/strmstpfd WHERE stm#d <> ' ' and stm#e <> ' '

I get all the records I expect, and there are values for each stm#d
and and stm#e.

Any ideas what I'm doing wrong here?

Thanks!





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact