Creating A New Field From Existing Fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My data records look like this:

Name Desc
CodeA BOXSF
CodeB BOXSA

I would like to create a new Field which will take the concatenate (append)
the word "New" with the 5th Character of the field Name and the 4th character
of the field Desc:

The result would look like this:

Name Desc NewField
CodeA BOXSF NewAS
CodeB BOXSA NewBS

Thank you in advance.
 
Bad idea! You should not store calculated or derived data. just use a query
to produce it when needed as the underlying data may have changed and you not
have updated the stored results.
That said here is your query field --
New Field Data: "New" & Right(Left([Name],5),1) & Right(Left([Desc],4),1)
 
carl said:
My data records look like this:
Name Desc
CodeA BOXSF
CodeB BOXSA

I would like to create a new Field which will take the concatenate (append)
the word "New" with the 5th Character of the field Name and the 4th character
of the field Desc:

SELECT
'New' & Mid([Name], 5, 1) & Mid([Desc], 4, 1) AS NewField
FROM
WhateverYourTableIsCalled

Always use a query to generate NewField; don't store it in your table!
 
Back
Top