Hallo mkinzler,
Delphi-Quellcode:
procedure TForm1.BtnReadTasksClick(Sender: TObject);
begin
Query_ContactCard.SQL.Text := 'Select * from `aa_shopdaten` where `shop_nr` in ( Select shopnr from `aa_tasks` where `taskstate` <> ''Erledigt'')';
Query_ContactCard.Open;
Query_ContactCard.FieldByName('id').AsString;
Lv_task.Items.Clear;
while not Query_Contactcard.Eof do
begin
LI := lv_task.Items.Add;
LI.Caption := '';
LI.SubItems.Add('');
LI.SubItems.Add(Query_ContactCard.FieldByName('shopnr').AsString);
LI.SubItems.Add(Query_ContactCard.FieldByName('shop_name').AsString);
LI.SubItems.Add(Query_ContactCard.FieldByName('task').AsString);
Query_ContactCard.Next;
end;
bringt mir
SQL-Error:unknown Column 'shop_nr' in 'IN/ALL/ANY subquery''
Er findet also wieder die shopnr nicht, habe ich noch irgendetwas übersehen?
Gruß rené