临时表。。大家帮帮忙(20分)

  • 主题发起人 主题发起人 rufengch99
  • 开始时间 开始时间
R

rufengch99

Unregistered / Unconfirmed
GUEST, unregistred user!
with DataModule1.ADOQuery2 do
begin
SQL.Clear ;
SQL.Add('select distinct * from tqhm_wap where 导入时间='''+FormatDateTime('yyyy-mm-dd',dtp1.date)+'''');
open;
end;
查询出来的数据,用dbgrid显示出来,我想把查询出来的数据存放一个临时表中,再用BCP导出成TXT,不知道要怎么做??
不要直接用insert into.....select ...用SQL语句的我会。。
 
with DataModule1.ADOQuery2 do
begin
SQL.Clear ;
SQL.Add('select distinct * into #tmp from tqhm_wap where 导入时间='''+FormatDateTime('yyyy-mm-dd',dtp1.date)+'''');
Execsql;
end;
再处理了,
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
505
import
I
后退
顶部