avatar
help with a simple query# Database - 数据库
w*t
1
I have a table like this
name JOB
-------------------
LEE J102
LEE J301
WANG A88
WANG A2
WANG A301
I need a query so that the result is:
name #jobs job-code
LEE 2 J102-J301
WANG 3 A88-A2-A301
I got problem with column "job-code" Anyone can help?
avatar
i*s
2
YOu can not do that in a simple query.
If you want to implement in server, write Stored procedure
using cursor;
If you want to implement in client, that is much easier.

【在 w******t 的大作中提到】
: I have a table like this
: name JOB
: -------------------
: LEE J102
: LEE J301
: WANG A88
: WANG A2
: WANG A301
: I need a query so that the result is:
: name #jobs job-code

avatar
w*t
3
Seems you are talking about SQL server. I'm working with access.
I wrote a VBA module and it works fine now.
thanks for the reply though.

【在 i**s 的大作中提到】
: YOu can not do that in a simple query.
: If you want to implement in server, write Stored procedure
: using cursor;
: If you want to implement in client, that is much easier.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。