This is a basic question.
I want to pull out some substrings and load two new fields. I get my values from:
SELECT Interface_List.ID,
Interface_List.Identifier,
InStr(1,[Identifier],'_') AS Len1,
Mid([Identifier],1,([Len1]-1)) AS T1,
Len([Identifier]) AS LenId,
Mid([Identifier],([Len1]+1)) AS Tk2,
InStr(1,[Tk2],'_') AS Len2,
Mid([Tk2],1,([Len2]-1)) AS T2
FROM Interface_List
ORDER BY Interface_List.Identifier;
If I now turn this into an update query and try to set eg NewField to T2, I find Access has removed all the calculated fields from the SQL so doesn't know what I'm up to.
How do you reference a calculated field in an Update?
[Note: I can work around this by creating a temporary table, joining to that and then referencing actual fields, but I'm sure there is a neater way]
I want to pull out some substrings and load two new fields. I get my values from:
SELECT Interface_List.ID,
Interface_List.Identifier,
InStr(1,[Identifier],'_') AS Len1,
Mid([Identifier],1,([Len1]-1)) AS T1,
Len([Identifier]) AS LenId,
Mid([Identifier],([Len1]+1)) AS Tk2,
InStr(1,[Tk2],'_') AS Len2,
Mid([Tk2],1,([Len2]-1)) AS T2
FROM Interface_List
ORDER BY Interface_List.Identifier;
If I now turn this into an update query and try to set eg NewField to T2, I find Access has removed all the calculated fields from the SQL so doesn't know what I'm up to.
How do you reference a calculated field in an Update?
[Note: I can work around this by creating a temporary table, joining to that and then referencing actual fields, but I'm sure there is a neater way]