1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. Informatik Forum
  2. Webmaster & Internet
  3. Entwicklung

mySQL 5.0.33 & Views ( & mySQL-Editor)

    • Frage
  • ethernet
  • 19. April 2007 um 17:32
  • Unerledigt
  • ethernet
    2
    ethernet
    Mitglied
    Punkte
    20
    Beiträge
    2
    • 19. April 2007 um 17:32
    • #1

    Hallo!

    Ich habe ein Problem mit mySQL 5.0.33 unter SuSE 10.2:

    Nach dem Abspeichern einer View wird diese "verunstaltet" bzw. anders dargestellt .:sudern:.

    Ein Beispiel:

    Hier meine View:

    SQL
    SELECT t.tic_id AS tic_id, 
           t.tic_fechahora AS tic_fechahora, 
           u.usu_nombre AS usu_nombre, 
           c.cli_nombre AS cli_nombre, 
           COALESCE((SELECT SUM(l.importe_con_descuento) 
                       FROM vwTicketsLineas l 
                      WHERE l.tic_id = t.tic_id), 0) AS Total, 
           COALESCE(t.tic_efectivo, 0) AS tic_efectivo, 
           COALESCE(t.tic_tarjeta, 0) AS tic_tarjeta, 
           COALESCE(t.tic_otro, 0) AS tic_otro, 
           COALESCE(((t.tic_efectivo + t.tic_tarjeta) + t.tic_otro), 0) AS Entregado, 
           COALESCE((((t.tic_efectivo + t.tic_tarjeta) + t.tic_otro) - (SELECT SUM(l.importe_con_descuento) 
                                                                          FROM vwticketslineas l 
                                                                         WHERE (l.tic_id = t.tic_id))), 0) AS Cambio 
      FROM tickets t, 
           usuarios u, 
           clientes c 
     WHERE t.usu_id = u.usu_id 
       AND t.cli_id = c.cli_id;
    Alles anzeigen

    Und nachher:

    Code
    select  
        t.tic_id AS tic_id, 
        t.tic_fechahora AS tic_fechahora, 
        u.usu_nombre AS usu_nombre, 
        c.cli_nombre AS cli_nombre, 
        coalesce(( 
      select  
        sum(l.importe_con_descuento) AS SUM(l.importe_con_descuento)  
      from  
        vwticketslineas l  
      where  
     (l.tic_id = t.tic_id)),0) AS Total,coalesce(t.tic_efectivo,0) AS tic_efectivo,coalesce(t.tic_tarjeta,0) AS tic_tarjeta,coalesce(t.tic_otro,0) AS tic_otro,coalesce(((t.tic_efectivo + t.tic_tarjeta) + t.tic_otro),0) AS Entregado,coalesce((((t.tic_efectivo + t.tic_tarjeta) + t.tic_otro) - ( 
      select  
        sum(l.importe_con_descuento) AS SUM(l.importe_con_descuento)  
      from  
        vwticketslineas l  
      where  
        (l.tic_id = t.tic_id))),0) AS Cambio  
      from  
        ((tickets t join usuarios u) join clientes c)  
      where  
        ((t.usu_id = u.usu_id) and (t.cli_id = c.cli_id));
    Alles anzeigen

    WARUM? KANN MAN DAS ABSTELLEN?
    Ich bin für jeden Hinweis oder auch jede Lösung sehr dankbar!

    MfG

    ethernet

    --------------
    Ich habe vergessen zu erwähnen, dass dies nichts mit mySQL-Editoren zu tun hat (habe TOAD und noch einen anderen Editor ausprobiert). Auch über die mySQL-Konsole geschieht das gleiche.

  • Maximilian Rupp 27. Dezember 2024 um 12:05

    Hat das Thema aus dem Forum Programmieren nach Entwicklung verschoben.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

Benutzerkonto erstellen Anmelden

Rechtliches

Impressum

Datenschutzerklärung