Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

maximum value from a comma separated column in sql

$
0
0

Hello All,

Recently i face a problem. I need to get max value from a comma separate column in sql. I can do it manualy bt not sure is it possible dynamical.  any one can help me to find out.

Input :

 ColumnA            ColumnB                   Year

Shadow
XXXX2005,2000,2011,2001,2002
Wolf
YYYYY2011,2009,2006,2007,2004,2005
LonelyZZZZ2006,2007,2008,2009,0000,2001

Out Put:

ColumnA            ColumnB                   Year
ShadowXXXX2011
WolfYYYYY2011
LonelyZZZZ2009

Is it possible 

Thanks for help



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>