关于dbchart的问题(100分)

J

jlm

Unregistered / Unconfirmed
GUEST, unregistred user!
我在程序中使用了一个DBchart.该dbchart的dateset为一个query,其SQL语句
如下:
select sum(物品进口数量) as col, month(rq) as mon
from 表名
group by mon
说明:该表为一进货表,每天一条记录,物品进口数量以及rq均为字段名
物品进口数量为integer,rq为date型
想对该物品按月统计总数,并用图形的方法显示,但是显示结果并不是
按月份大小顺序排列的,如果在SQL中加order by mon 则出错,请各位大侠指教
(数据库用的是SYbase SQLAnywhere)
另外请教各位:用Sybase SQLAnywhere 是否必须通过 ODBC 进行连接。
 
Can this sentence:

select sum(物品进口数量) as col, month(rq) as mon from 表名 group by mon
order by 2

do the work? (Some SQL does not support order by a field's
name, while the field is a result of a arithmatic fomulation)


 
Borland SQL Links may support Sybase SQLAnywhere
 
pegasus ,第一个问题如您所说,已经解决,感谢了,先预加您老人家50分
不过能否对 SQL links 的用法详细解释一下,小弟拜托了
 
Hehe, thank you.

SQL Links is a driver for BDE that Borland designed to connect data
base. (Borland Database Engine).

I remember when Microsoft has not provide a good ODBC driver for its
own SQL Server, (not so good because it can't let you get BIN data
from SQL Server, but you do can store data into it), I use Borland's
SQL Links instead to connect SQL Server, and it worked fine, :)
 
接受答案了.
 
顶部