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
 
DaWi

Registriert seit: 22. Nov 2003
9 Beiträge
 
#3

Re: Warum geht diese SQL Anweisung nicht?

  Alt 12. Dez 2003, 06:36
Ich bin mir jetzt nicht ganz sicher, aber laß bei den rot markierten Teilen mal die Hochkommata weg... das sind ja Namen und keine Feldinhalte... zudem benötigst / benutzt Du diese Namen ja gar nicht oder ???

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)[color=red] AS 'Info'[/color], count(*) [color=red]AS 'Anzahl' [/color]from 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;
Gruß

DaWi

[edit=r_kerber]SQL-Tags gesetzt! Mfg, r_kerber[/edit]
  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 22:30 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