Einzelnen Beitrag anzeigen

Benutzerbild von Mauli
Mauli

Registriert seit: 7. Apr 2003
Ort: Wuppertal
160 Beiträge
 
Delphi 2005 Enterprise
 
#3

Re: Daten in Access reinschreiben...

  Alt 31. Mai 2004, 16:33


Ach du meine Güte...



Meine SQL sieht ca so aus:

SQL-Code:
SELECT KOND_LFSP, INLAND_AUSLAND, STORNO, KONTO, COUNT(*) AS ANZAHL
     , SUM(BETRAG_INCL_UST), SUM(UST), SUM(BETRAG_INCL_UST + UST)
FROM (
SELECT
       CASE WHEN GS_KONTONUMMER = 9648309907
             AND GS_SERVICEFUNKTION = 'LFSP'  THEN 'XTRA FEE'      
            WHEN GS_KONTONUMMER = 9648409904
             AND GS_SERVICEFUNKTION = 'LFSP'  THEN 'SNO GEB'       
            WHEN GS_AUSLOESER = 'UMTA'                           
                                              THEN ' UMTAUSCH'     
            ELSE GS_KONDITION_KUERZ
       END AS KOND_LFSP
     , CASE WHEN GS_KONTONUMMER = 9648309907
             AND GS_SERVICEFUNKTION = 'LFSP'                       
              THEN GS_BETRAG_EURO / 100 * 116
            WHEN GS_KONTONUMMER = 9648409904
             AND GS_SERVICEFUNKTION = 'LFSP'                       
              THEN GS_BETRAG_EURO
            ELSE GS_BETRAG_EURO * -1
       END AS BETRAG_INCL_UST
     , GS_KONTONUMMER AS KONTO
     , CASE WHEN (GS_KONTONUMMER = 9648309907
                  AND GS_SERVICEFUNKTION = 'LFSP')
            THEN GS_BETRAG_EURO / 100 * 16
            WHEN (GS_KONTONUMMER = 9648409904
                  AND GS_SERVICEFUNKTION = 'LFSP')
THEN GS_BETRAG_EURO / 116 * 16
         WHEN GS_KONDITION_KUERZ = 'CLEARGEB'           
           OR GS_KONDITION_KUERZ = 'CLEARGS'            
           OR GS_KONDITION_KUERZ = 'CLEARNAM'           
           OR GS_KONDITION_KUERZ = 'CCPFEE'             
         THEN GS_BETRAG_EURO / 116 * 16 * -1
         ELSE 0
    END AS UST
  , CASE WHEN GS_KONDITION_KUERZ = 'CLEARGEB'       
           OR GS_KONDITION_KUERZ = 'CLEARGS'        
           OR GS_KONDITION_KUERZ = 'CLEARZV'        
           OR GS_KONDITION_KUERZ = 'LOCO'           
          THEN ' '                      
         WHEN GS_KONTONUMMER = 9648309907
          AND GS_SERVICEFUNKTION = 'LFSP'               
          THEN ' '                      
         WHEN GS_KONTONUMMER = 9648409904
          AND GS_SERVICEFUNKTION = 'LFSP'               
          THEN ' '                      
         WHEN GS_AUSLOESER = 'UMTA'                   
          AND SUBSTR(GS_FI_BENUTZERSCHL,1,2) = 'DE'     
          THEN 'INLAND'                      
         WHEN GS_AUSLOESER = 'UMTA'                   
          AND SUBSTR(GS_FI_BENUTZERSCHL,1,2) ^= 'DE'    
          THEN 'AUSLAND'
ELSE ' '                                      
       END AS INLAND_AUSLAND
     , CASE WHEN GS_GELDBUCHUNGSTYP = 'STBU'                            
             THEN ' STORNO'                                                 
            ELSE ' '                                                       
       END AS STORNO
FROM PD02.XGKKD01T
WHERE (( GS_AUSLOESER = 'HAND'                                           
       AND GS_GABRV_FI_GRUPPE ^= 'FOND'                                     
       AND ((GS_SERVICEFUNKTION = 'LFSPAND GS_KONTONUMMER IN (9648309907,
                                                                9648409904))
             OR (GS_SERVICEFUNKTION ^= 'LFSP')
                 AND GS_KONDITION_KUERZ IN ('LOCO','CLEARGEB','CCPFEE',
                                  'CLEARGS','CLEARNAM','CLEARZV')) )
   OR ( GS_AUSLOESER = 'UMTA') )
-- AND GS_DEPOTNUMMER = 7961515003
  AND GS_DEPOTNUMMER BETWEEN 7961515000 AND 7961515999
  AND ( (MONTH(GS_ABRECH_DATUM) = MONTH(CURRENT TIMESTAMP) - 1)
       OR (MONTH(CURRENT TIMESTAMP) = 1 AND
           MONTH(GS_ABRECH_DATUM) = 12) )
  AND GS_ABRECH_DATUM > '12.06.2003'                                        
  AND ((GS_GELDBUCHUNGSTYP = 'ECHTAND GS_BETRAG_EURO > 0) OR
       (GS_GELDBUCHUNGSTYP = 'STBUAND GS_BETRAG_EURO < 0) OR
       (GS_SERVICEFUNKTION = 'LFSP') OR
       (GS_AUSLOESER = 'UMTA') )
) AS TAB1
 GROUP BY KOND_LFSP, INLAND_AUSLAND, STORNO, KONTO
Wo ist denn da der Vortschritt von Paradoxtabellen auf eine Access Datenbank?

Gibt es vielleicht eine einfache Möglichkeit von Paradox nach Access zu schaufen???
  Mit Zitat antworten Zitat