Tuesday 15 July 2014

sql - Get all values after certain keyword -


I have some values ​​in the SQL table column like:

  | ---- ----------- | | Line id | | --------------- | | ABC 02 Team 01A | | DDF 03 Team 3D | | --------------- |   

What do I do, get value after team

then output should be:

  01A 3D   

How do I store it?

If you really have everything this text will work in the same column: Select

  SUBSTRING ([line ID], CHARindex ('TEAM', [Line ID], 1) + LEN ('TEAM'), table     to LAN ([LINE ID])

No comments:

Post a Comment