Code that pulls out characters to make field

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

Guest

Can I have some help with a SQL statement that will pull chars 9 thru 16 and
copy that chunk of data from Field2 and populate Field1. I don't want the
data in Field2 to change. The table is Tab1
 
Can I have some help with a SQL statement that will pull chars 9 thru 16 and
copy that chunk of data from Field2 and populate Field1. I don't want the
data in Field2 to change. The table is Tab1

Select Mid([Field2],9,8) as Field1 From Tab1;
 
The SQL statement would look something like

UPDATE [SomeTableName]
SET [Field1] = Mid([Field2],9,8)
WHERE [Field2] is Not Null
 
Back
Top