AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Warum geht diese SQL Anweisung nicht?
Thema durchsuchen
Ansicht
Themen-Optionen

Warum geht diese SQL Anweisung nicht?

Ein Thema von trialfreak · begonnen am 11. Dez 2003 · letzter Beitrag vom 12. Dez 2003
 
trialfreak

Registriert seit: 19. Okt 2003
24 Beiträge
 
Delphi 6 Professional
 
#1

Warum geht diese SQL Anweisung nicht?

  Alt 11. Dez 2003, 22:27
Hallo,
ich habe mit dem MySQLControlCenter folgende SQL-Anweisung zusammengestellt die dort auch ohne Probleme funktioniert:

SQL-Code:
DROP TEMPORARY TABLE IF EXISTS temp_table1;
CREATE TEMPORARY TABLE temp_table1 (info text, anzahl_allg text, anzahl_inst text);
INSERT INTO temp_table1 (info, anzahl_allg) SELECT year(abgabedatum), count(*) from gutachten where freigegeben = 1 group by year(abgabedatum);
DROP TEMPORARY TABLE IF EXISTS temp_table2;
CREATE TEMPORARY TABLE temp_table2 (info text, anzahl_inst text);
INSERT INTO temp_table2 (info, anzahl_inst) SELECT year(abgabedatum) AS 'Info', count(*) AS 'Anzahlfrom gutachten where inr = 11 and freigegeben = 1 group by year(abgabedatum);
UPDATE temp_table1, temp_table2 set temp_table1.anzahl_inst = temp_table2.anzahl_inst where temp_table1.info = temp_table2.info;
Meine Datenbankverbindung zu einem MySQL Server via BDE/MyODBC funktioniert so aber nicht.
Der Query scheint Probleme mit mehreren Anweisungen zu haben.

Wie muss ich das umsetzen?

Das Ergebnismenge möchte ich später gerne mit select * from temp_table1 abrufen.
mfg,
Christian
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:01 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 by Thomas Breitkreuz