Operation =1
Option =0
Where ="(((tbl_energievertrag.MEP_Vertragsnummer)=[MEP Vertragsnummer eingeben]))"
Begin InputTables
    Name ="tbl_energievertrag"
    Name ="tbl_statustabelle"
    Name ="tbl_kunden_solar"
    Name ="tbl_mepleadeingang"
    Name ="tbl_mepleadeingangtyp"
    Name ="tbl_ad"
End
Begin OutputColumns
    Expression ="tbl_energievertrag.MEP_Vertragsnummer"
    Expression ="tbl_energievertrag.Status_NR"
    Expression ="tbl_statustabelle.KD_NR"
    Expression ="tbl_kunden_solar.mep_kd_nummer"
    Expression ="tbl_mepleadeingang.anrede"
    Expression ="tbl_mepleadeingang.vorname"
    Expression ="tbl_mepleadeingang.nachmane"
    Expression ="tbl_mepleadeingang.Kampagne"
    Expression ="tbl_mepleadeingangtyp.name"
    Expression ="tbl_ad.AD"
End
Begin Joins
    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
    LeftTable ="tbl_kunden_solar"
    RightTable ="tbl_mepleadeingang"
    Expression ="tbl_kunden_solar.mep_kd_nummer = tbl_mepleadeingang.lead_id"
    Flag =1
    LeftTable ="tbl_mepleadeingang"
    RightTable ="tbl_mepleadeingangtyp"
    Expression ="tbl_mepleadeingang.bearbeitungsstatus = tbl_mepleadeingangtyp.id"
    Flag =1
    LeftTable ="tbl_mepleadeingang"
    RightTable ="tbl_ad"
    Expression ="tbl_mepleadeingang.BCSADID_c = tbl_ad.ID"
    Flag =2
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 =0
    ColumnsShown =539
    Begin
        Left =38
        Top =6
        Right =134
        Bottom =115
        Top =0
        Name ="tbl_energievertrag"
        Name =""
    End
    Begin
        Left =375
        Top =12
        Right =471
        Bottom =121
        Top =0
        Name ="tbl_statustabelle"
        Name =""
    End
    Begin
        Left =658
        Top =21
        Right =754
        Bottom =130
        Top =0
        Name ="tbl_kunden_solar"
        Name =""
    End
    Begin
        Left =841
        Top =8
        Right =937
        Bottom =117
        Top =30
        Name ="tbl_mepleadeingang"
        Name =""
    End
    Begin
        Left =1121
        Top =14
        Right =1217
        Bottom =93
        Top =0
        Name ="tbl_mepleadeingangtyp"
        Name =""
    End
    Begin
        Left =1512
        Top =9
        Right =1608
        Bottom =118
        Top =0
        Name ="tbl_ad"
        Name =""
    End
End
