//没什么技术因素,写一个就行了function CreateSQLString(ATableName:string;AStringList:TStringList):string; var i:integer; begin Result:=''; if (not Assigned(AStringList))or(AStringList.Count<=0) then Exit; for i:=0 to AStringList.Count-1 do begin if i<>0 then Result:=Result+','; Result:=Result+AStringList.Strings[i]; end; Result:='SELECT '+Result+' FROM'+ATableName; end;
var
i:integer;
begin
Result:='';
if (not Assigned(AStringList))or(AStringList.Count<=0) then Exit;
for i:=0 to AStringList.Count-1 do
begin
if i<>0 then Result:=Result+',';
Result:=Result+AStringList.Strings[i];
end;
Result:='SELECT '+Result+' FROM'+ATableName;
end;