Operation =1
Option =0
Where ="(((tbl_ad.AD) Like [AD angeben]))"
Begin InputTables
    Name ="tbl_leadbezahlt"
    Name ="tbl_energievertrag"
    Name ="tbl_ad"
    Name ="tbl_mepfirma"
    Name ="tbl_statustabelle"
    Name ="tbl_kunden_solar"
End
Begin OutputColumns
    Expression ="tbl_leadbezahlt.ID_lb"
    Expression ="tbl_leadbezahlt.Lead_ID"
    Expression ="tbl_leadbezahlt.Bezahlt_AM"
    Expression ="tbl_leadbezahlt.Bezahlt_Von"
    Expression ="tbl_leadbezahlt.AD"
    Expression ="tbl_leadbezahlt.Provision"
    Expression ="tbl_ad.AD"
    Expression ="tbl_mepfirma.name_mef"
    Expression ="tbl_kunden_solar.bcs_kd_nummer"
    Expression ="tbl_kunden_solar.mep_kd_nummer"
    Expression ="tbl_kunden_solar.bcs_kd_nummer"
    Expression ="tbl_kunden_solar.mep_kd_nummer"
End
Begin Joins
    LeftTable ="tbl_leadbezahlt"
    RightTable ="tbl_energievertrag"
    Expression ="tbl_leadbezahlt.Lead_ID = tbl_energievertrag.MEP_Vertragsnummer"
    Flag =1
    LeftTable ="tbl_leadbezahlt"
    RightTable ="tbl_ad"
    Expression ="tbl_leadbezahlt.AD = tbl_ad.ID"
    Flag =1
    LeftTable ="tbl_ad"
    RightTable ="tbl_mepfirma"
    Expression ="tbl_ad.id_mepfirma = tbl_mepfirma.id_mepfirma"
    Flag =1
    LeftTable ="tbl_energievertrag"
    RightTable ="tbl_statustabelle"
    Expression ="tbl_energievertrag.Status_NR = tbl_statustabelle.Status_NR"
    Flag =1
    LeftTable ="tbl_statustabelle"
    RightTable ="tbl_kunden_solar"
    Expression ="tbl_statustabelle.KD_NR = tbl_kunden_solar.bcs_kd_nummer"
    Flag =1
End
dbBoolean "ReturnsRecords" ="-1"
dbInteger "ODBCTimeout" ="60"
dbByte "RecordsetType" ="0"
dbBoolean "OrderByOn" ="0"
dbByte "Orientation" ="0"
dbByte "DefaultView" ="2"
Begin
End
Begin
    State =2
    Left =-4
    Top =-25
    Right =3440
    Bottom =1246
    Left =-1
    Top =-1
    Right =3437
    Bottom =144
    Left =0
    Top =6
    ColumnsShown =539
    Begin
        Left =38
        Top =0
        Right =134
        Bottom =109
        Top =2
        Name ="tbl_leadbezahlt"
        Name =""
    End
    Begin
        Left =389
        Top =1
        Right =485
        Bottom =110
        Top =0
        Name ="tbl_energievertrag"
        Name =""
    End
    Begin
        Left =638
        Top =26
        Right =734
        Bottom =135
        Top =2
        Name ="tbl_ad"
        Name =""
    End
    Begin
        Left =966
        Top =39
        Right =1062
        Bottom =118
        Top =0
        Name ="tbl_mepfirma"
        Name =""
    End
    Begin
        Left =1425
        Top =-15
        Right =1521
        Bottom =94
        Top =0
        Name ="tbl_statustabelle"
        Name =""
    End
    Begin
        Left =1668
        Top =6
        Right =1764
        Bottom =115
        Top =0
        Name ="tbl_kunden_solar"
        Name =""
    End
End
