I need the best way to update my Street_full_Name column. This column is derived from 4 other columns within the same table. Would this be the best time to use a computed column or trigger?
I am of the understanding that creating a trigger on the same table may cause some headaches. This i'm not sure about i read it somewhere.
My update code i'm working on looks like this.
Street_Full_Name = LTRIM(RTRIM(s.Prefix_Full)+' '+RTRIM(s.Street_Name)+
CASE WHEN s.Suffix_Cnty = 'n/a' AND s.Suffix_Bell = 'n/a' THEN '' ELSE ' '+RTRIM(s.Suffix_Full)END)
+' '+ RTRIM(s.Suffix_Direction
FROM dbo.Street s
Can someone help me out please.
Errors received are
Msg 156, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'FROM'.