|
20鱼币
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ToolWin, ComCtrls, DB, ADODB, StdCtrls, Grids, DBGrids, Menus,
IdBaseComponent, IdDateTimeStamp, DateUtils;
type
TForm1 = class(TForm)
tlb1: TToolBar;
btn1: TButton;
btn2: TButton;
qry1: TADOQuery;
dbgrd1: TDBGrid;
ds1: TDataSource;
mm1: TMainMenu;
F1: TMenuItem;
E1: TMenuItem;
O1: TMenuItem;
H1: TMenuItem;
A1: TMenuItem;
F2: TMenuItem;
B1: TMenuItem;
C1: TMenuItem;
V1: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
S1: TMenuItem;
D1: TMenuItem;
N3: TMenuItem;
X1: TMenuItem;
btn3: TButton;
btn4: TButton;
tlb2: TToolBar;
lbl1: TLabel;
dtp1: TDateTimePicker;
lbl2: TLabel;
dtp2: TDateTimePicker;
procedure btn1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
qry1.Close;
qry1.SQL.Clear;
qry1.SQL.Text:= ' select sum(DECODE(SHDJLB,''G'',1,''E'',1,''A'',1,''8'',1,''5'',1,''1'',1,''H'',-1,''D'',-1,''B'',-1,''7'',-1,''4'',-1,''2'',-1,0)*spmoney)' +
' ''yidong'' from sellhead,sellpayment WHERE spbillno=shbillno and ' +
'( SHDATE >= TO_DATE(''2013-08-17'',''YYYY-MM-DD'') AND SHDATE < TO_DATE(''2013-08-17'', ''YYYY-MM-DD'') + 1 ) ' +
' AND SPPMCODE = ''91'' and shsyjid = ''2008'';';
qry1.Open;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
dtp1.Date:= now;
dtp2.Date:= Now;
end;
end.
哪里出错了额 每次都编译提示 from keyword not found where expected
|
|