The begin
With qry1 do
The begin
The Close;
SQL. The Clear;
SQL. The Add (' select gs code, gs code2, gs. The name, the sum (sd) qty * s.i nv_qty_unary * (1)) XSSL, sum ((sd) amt + sd) tax) * s.i nv_qty_unary * (1)) xsje ');
SQL. The Add (' the from SDRPTS sd, subject s, gs, goods store st ');
SQL. The Add (' where sd. SND=st. gid ');
SQL. The Add (' and sd. Gdgid=gs. Gid ');
And sd. CLS in SQL. The Add (' (' retail ', 'retail' back) ');
SQL. The Add (' and sd. CLS=s.s ubname ');
SQL. Add (' and sd. Fildate & gt;="' + FormatDateTime (' yyyy. Mm. Dd, dtp1. Date) + ' ' ' ');
SQL. Add (' and sd. Fildate & lt;="' + FormatDateTime (' yyyy. Mm. Dd, dtp2. Date) + ' ' ' ');
SQL. The Add (' group by gs code, gs code2, gs. The name ');
The open;
end;
End
Single from the SQL statements written in DELPHI can export data but no data, do not know where the problem is, please prawns help have a look at
CodePudding user response:
+ FormatDateTime (' yyyy. Mm. Dd, dtp1. Date) + "'");SQL. Add (' and sd. Fildate & lt;="' + FormatDateTime (' yyyy. Mm. Dd, dtp2. Date) + ' ' ' ');
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- & gt;>
+ FormatDateTime (' - dd yyyy - mm, dtp1. Date) + "'");
SQL. Add (' and sd. Fildate & lt;="' + FormatDateTime (' - dd yyyy - mm, dtp2Date) + ' ' ' ');
CodePudding user response:
Would you stop SQL. The add so many times youSTR: first string;
STR='; ' Add your those words, written in a
The SQL again. The add (STR);
CodePudding user response:
Print statements in the program to test and see which if you have any questionsCodePudding user response: