使用分隔符合并列中的不同值 [英] Merging different values in a column using a separator

查看:77
本文介绍了使用分隔符合并列中的不同值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want to get Id and Text value from database in such a manner that both are returned as a single column with values separated by some separator. I'm thinking of using '$' sign as separator of values. eg: Suppose if Id is 10 and Text is 'abc', in my current way value will be returned as '10$abc'. I want to know is there any standard of using some specific operators to combine values or one can use any separator one desires?;





< b>我尝试了什么:





What I have tried:

Suppose if Id is 10 and Text is 'abc', in my current way value will be returned as '10$abc'. I want to know is there any standard of using some specific operators to combine values or one can use any separator one desires?;

推荐答案

'签署为价值观的分隔符。例如:假设如果Id为10且Text为'abc',则以我当前的方式将值返回为'10
' sign as separator of values. eg: Suppose if Id is 10 and Text is 'abc', in my current way value will be returned as '10


abc'。我想知道是否有使用某些特定运算符组合值的标准,或者可以使用任何想要的分隔符?;
abc'. I want to know is there any standard of using some specific operators to combine values or one can use any separator one desires?;





< b>我尝试了什么:





What I have tried:

Suppose if Id is 10 and Text is 'abc', in my current way value will be returned as '10


abc'的形式返回。我想知道是否有使用某些特定运算符组合值的标准,或者可以使用任何想要的分隔符?;
abc'. I want to know is there any standard of using some specific operators to combine values or one can use any separator one desires?;


这篇关于使用分隔符合并列中的不同值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆