使用SQL Query总结一个特定的no [英] Sum a specific no using SQL Query

查看:79
本文介绍了使用SQL Query总结一个特定的no的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一些数据如PD12 / 09 / 2007F 550 R12在一个字段中

字段数量约为20

我想从每张唱片中总计只有550(上面提到过)。

怎么做?

我用过这个编码简单的数字。

Hi all,
I have some data like PD12/09/2007F550R12 in a field
The number of fields are about 20
I want to sum only 550 (Mentioned above) from every record.
How to do it?
I have used this coding for simple numbers.

展开 | 选择 | Wrap | 行号

推荐答案

hi


使用中期功能

例如:

intA = mid(< PD12 / 09 / 2007F 550 R12",17,3)
inta有550
hi

Use Mid function
for ex:
intA = mid("PD12/09/2007F550R12",17,3)
inta have 550


都是d ata的格式/长度是一样的吗?


然后找到值,转换为数字并找到总和,这些都是数据库级别的。
Is all the data in the same format / length ?

then find the value ,convert to number and find the sum, all that at database level.



hi


使用Mid函数

代表:

intA = mid (PD12 / 09 / 2007F 550 R12,17,3)

inta有550
hi

Use Mid function
for ex:
intA = mid("PD12/09/2007F550R12",17,3)
inta have 550



您好,

Thanc解决方案。

但是有一些问题

  • 我必须把antA

    在每个领域日期不必相同或者550可以是1000或任何其他人。

  • 这篇关于使用SQL Query总结一个特定的no的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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