Combining fields

  • Thread starter Thread starter Jason McClellan
  • Start date Start date
J

Jason McClellan

Hello.. I have a database, which we use for inventory tracking. In past
years, we have simply updated our 'quantity onhand' field with the new
count. However, this year, we did only a partial count, and for accounting
purposes we kept the new count separate from the old count (I created a new
field for the new data). Now that it is complete and the numbers are in, we
want to take the new data from the new column and 'move' it into the old
column, such that any row with a value in the 'new' field would have it
moved to the 'old' field, and any row with nothing in the new field, would
leave whatever is already in the old field.

I was just wondering if anybody had some tips or ideas for me in this. I
haven't done such a query before and thought I'd rack your brains a little
too :)

Thanks
Jason
 
try this on a COPY of your database:

UPDATE TableName SET TableName.OldCountFieldName =
[TableName].[NewCountFieldName]
WHERE TableName.NewCountFieldName Is Not Null;

hth
 
Most decent! Works perfectly.

Thank you very much for your help!

Jason

tina said:
try this on a COPY of your database:

UPDATE TableName SET TableName.OldCountFieldName =
[TableName].[NewCountFieldName]
WHERE TableName.NewCountFieldName Is Not Null;

hth


in message news:[email protected]...
Hello.. I have a database, which we use for inventory tracking. In past
years, we have simply updated our 'quantity onhand' field with the new
count. However, this year, we did only a partial count, and for accounting
purposes we kept the new count separate from the old count (I created a new
field for the new data). Now that it is complete and the numbers are
in,
we
want to take the new data from the new column and 'move' it into the old
column, such that any row with a value in the 'new' field would have it
moved to the 'old' field, and any row with nothing in the new field, would
leave whatever is already in the old field.

I was just wondering if anybody had some tips or ideas for me in this. I
haven't done such a query before and thought I'd rack your brains a little
too :)

Thanks
Jason
 
Back
Top