![]() |
Re: SQL-Anfrage aus anderer Tabelle bilden
Ich wollte einfach mal eine unreife Lösung posten für mein Problem, zumindest funktioniert es
Delphi-Quellcode:
while not DModFakturierung.Q_FFAKTRELA.Eof = True do
begin rela1[z] := StrToInt(DModFakturierung.Q_FFAKTRELARelation1.Value); DModFakturierung.Q_FFAKTRELA.Next; inc(z); end; for i := 0 to (y - 1) do begin if i = 0 then begin sRela1 := IntToStr(rela1[i]); s1 := '(RELATION = '+QuotedStr(sRela1)+') '; end; if i > 0 then begin sRela1 := IntToStr(rela1[i]); s1 := 'OR (RELATION = '+QuotedStr(sRela1)+') ' end; s := s + s1; end;//END FOR Schleife Result := 'AND ('+s+')'; Greets Luciano |
Re: SQL-Anfrage aus anderer Tabelle bilden
... wie wäre es damit um doppelte zu filtern...
Delphi-Quellcode:
procedure ....
var a: array of integer; i,j,anz: integer; begin while not DModFakturierung.Q_FFAKTRELA.Eof do begin i:=StrToInt(DModFakturierung.Q_FFAKTRELARelation1.Value); anz:=length(a); // anzahl der element if i>=anz then begin setlength(a,i+1); // anzahl vergrößern for j:=anz to i do a[j]:=0; // intialisieren end; // if inc(a[i]); // diese zahl zufügen DModFakturierung.Q_FFAKTRELA.Next; end; // while for i:=0 to length(a)-1 do if a[i]=1 then showmessage(inttostr(i)+' ist nur einmal vorhanden'); end; [edit] falls 0 auch vorhanden ist, dann intialisiere und frage ab auf -1[/edit] |
Re: SQL-Anfrage aus anderer Tabelle bilden
Hi ibp
Thx, ich werde es mal bei Gelegenheit testen, bin etwas unter Zeitdruck... :? und muß mal etwas lauffähiges vorzeigen, optimieren kann ich dann immer noch. Greets Luciano |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:07 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz