I want to update a row which is in format like this ABC - DEF - GHI - ABD
,
Using a cmd like this UPDATE tbl SET col = Replace(col,@var, ) WHERE Pk=something.
How can I remove the trailing or leading hyphens? For exmaple if @var is GHI, after replace, row value should be ABC-DEF-ABD or if @var is ABC then value should be DEF - GHI - ABD.
I ve got two tables: TableA Col1 Col2 TableB Col3 Col4 I want to join them together: SELECT * from TableA join TableB ON (...) Now, in place of ... I need to write an expression ...