J
jomee
Unregistered / Unconfirmed
GUEST, unregistred user!
access:
SELECT [零售业务].[商品编号], Sum([零售业务].[数量]) AS 数量之Sum INTO 零售业务记录
FROM 零售业务
GROUP BY [零售业务].[商品编号]
delphi:
procedure TForm1.Button1Click(Sender: TObject);
begin
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('SELECT [零售业务].[商品编号], Sum([零售业务].[数量]) AS 数量之Sum INTO 零售业务记录');
SQL.Add('FROM 零售业务');
SQL.Add('GROUP BY [零售业务].[商品编号]');
ExecSQL;
end;
end;
SELECT [零售业务].[商品编号], Sum([零售业务].[数量]) AS 数量之Sum INTO 零售业务记录
FROM 零售业务
GROUP BY [零售业务].[商品编号]
delphi:
procedure TForm1.Button1Click(Sender: TObject);
begin
with ADOQuery1 do
begin
Close;
SQL.Clear;
sql.Add('SELECT [零售业务].[商品编号], Sum([零售业务].[数量]) AS 数量之Sum INTO 零售业务记录');
SQL.Add('FROM 零售业务');
SQL.Add('GROUP BY [零售业务].[商品编号]');
ExecSQL;
end;
end;