本文介绍了如何计算列中的单词。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 Hello All 这个SQL的新手。 如何计算列中的单词并将其总计为总和。 br /> 例如: 表1包含 州|| crs1 || crs2 || crs3 ||容量|| crs1_tar || crs2_tar || crs3_tar AP || 25 || 10 || 0 || 360 ||已批准||没有||没有 TS || 10 || 20 || 2 || 360 ||没有||已批准||批准 MP || 21 || 33 || 2 || 360 ||没有||没有||没有 这里crs1,2,3是课程名称,crs_tar是课程的目标。 好​​吧,我需要一个如下综合数据: TS || crs1 || crs2 || crs3 容量|| 0 || 360 || 360 分配|| 10 || 20 || 2 此处的容量根据crs_tar计算。 我希望很清楚。 我的尝试: 我试过了它在excel表中并需要将其转换为SQL 解决方案 Hello AllAm new to this SQL.How to count words in a column and sum it as a total.Example:Table1 containsState || crs1 || crs2 || crs3 || Capacity || crs1_tar || crs2_tar || crs3_tarAP || 25 || 10 || 0 || 360 || Approved || No || NoTS || 10 || 20 || 2 || 360 || no || Approved || ApprovedMP || 21 || 33 || 2 || 360 || no || no || noHere crs1,2,3 is Course names and crs_tar is targets for the course.Well, i need a consolidated data like the following:TS || crs1 || crs2 || crs3Capacity || 0 || 360 || 360Allocated || 10 || 20 || 2 Here Capacity is counted according to crs_tar.I hope am clear.What I have tried:I have tried it in the excel sheet and need to convert it to SQL 解决方案 这篇关于如何计算列中的单词。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-23 19:25