如何通过不同的值计算和构建字符串

时间:2019-03-24 17:55:57

标签: sql teradata teradata-sql-assistant

我需要在teradata上执行以下脚本,以从下表中获取不同的ID-COLUMN ID,然后按不同的列ID对列设备进行计数,然后从列名AB,BEGOOD SUBSTRING到新列中,现场

ID        Device      Name
11123503     500    AB_BEGOOD_ONSITE_VOOM
11123503     700    AB_LATESTMODEL_ONSITE_VOOM
11123503     900    AB_LATESTMODEL_ONSITE_VOOM
11123503     870    AB_LATESTMODEL_ONSITE_VOOM
11123503     489    AB_LATESTMODEL_ONSITE_VOOM
11132048     134    AB_BEGOOD_ONSITE_VOOM
11132048     342    AB_BEGOOD_ONSITE_VOOM
11132048     545    AB_BEGOOD_ONSITE_VOOM
11132048     847    AB_BEGOOD_ONSITE_VOOM

enter image description here

0 个答案:

没有答案