Einzelnen Beitrag anzeigen

Benutzerbild von SilverMoonGirl
SilverMoonGirl

Registriert seit: 21. Aug 2003
Ort: Berlin
160 Beiträge
 
Delphi 6 Professional
 
#8

Re: [SQL]Alle Spalten bis auf eine auswählen

  Alt 5. Jan 2007, 09:30
Achso ja, na klar

Delphi-Quellcode:
Var Spalten: String;
begin
  Query.GetFieldNames(ListBox3.Items);
  
  For i:= 0 to ListBox3.Count -2 do
  begin
    if i = ListBox3.Count -2 then
      Spalten:= Spalten + ListBox3.Items[i]
    else
      Spalten:= Spalten + Listbox3.Items[i] + ', ';
  end;
end;

...
SQL.Add('SELECT '+ Spalten + ' FROM tabelle');
...
Simone
There is no dark side of the moon really.
Matter of fact it's all dark.
.::mein Blog::.
  Mit Zitat antworten Zitat