SQL code:
/*
表A
vbeln erdat prdha
0090056842 2009-12-02 00:00:00.000 D0EXBX133X
0090058691 2009-12-18 00:00:00.000 D0EXBX133X
表B
erdat1 prdha price rate
2009-12-01 00:00:00.000 D0EXBX133X 90.52 0.020
2009-12-0 ......
表A有c,d等字段
想获得c字段指不重复的所有记录应该怎么写
select c,d from a group by c
select * from a where not exists(select 1 from a b where name=b.c and d>b.d)
select * from a where c not i ......
在access中,Sql语句的限制长度是多少?
引用
SQL 语句中的字符个数 约为 64,000
谢谢wwwwa,sql语句可以那么多,Access对此有没有限制
Access对此有没有限制:什么限制?表个数?
引用
Access对此有没有限制:什么限制?表个数?
我是想知道,是不是不同类型的的数据库对sql语句长度有自己的限制,ac ......
表a
no1 name class score
1 A 初一1 60
2 B 初二2 70
3 C 初一2 30
4 D 初二1 80 ......
表 class
ID txtName
1 1
2 2
3 1
4 3
5 2
6 3
得到结果是:
ID txtname
1 1
2 2
4 3
请CSDN友帮忙看看,好象是一道面试题~~
就是 txtName 重复的时候,取最小的ID号
select (select top 1 id from 表 where txtname=B.txtname) AS ID,
B.txtname ......
'for payment type
sCmd = "Select Sum(B.PaymentAmount) As SPaymentAmount, Sum(B.Changes) As SChange, "
sCmd = sCmd & " B.PaymentType from Trans A INNER JOIN TransPayment B ON A.TransID = B.TransID "
sCmd = sCmd & " ......