I want to update columns(HostActvTyp and HostPrvTyp) when (HostCd) column last name is matching with last word of the string is "R" example string for host column "NXVR','REACTIVE', so the last word is R so we have to update to Reactive when it's N' to 'NEW' example "XVDN" enter image description here
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- php PDO::FETCH_ASSOC doesnt detect select after ba
- sqlyog export query result as csv
https://www.db-fiddle.com/f/bG4jZfnWksjc315eGTuG2k/1
Or if there is a space separator
seems you are looking for left or substr()