You are on page 1of 6

If Trim(rr("MOBILENO")) <> "" Then

MOBILENO = rr("MOBILENO")
Else
MOBILENO = ""
End If

'code added by senba 13122010


If rr("MOBILENO") <> "" Then
Set rs3 = con.OpenResultset("SELECT ACT_DATE FROM TN_AIRTEL_PRE_ACTIV
E_MASTER WHERE MOBILENO='" & rr("MOBILENO") & "' AND SRLNO='" & rr("ACT_SRLNO")
& "' AND EXPIRY IS NULL order by act_date desc")
'Set rs3 = con.OpenResultset("SELECT ACT_DATE FROM TN_AIRTEL_PRE_ACTI
VE_MASTER WHERE MOBILENO='" & rr("MOBILENO") & "' AND TO_DATE(PROCESSDATE) betwe
en '" & FDate & "' AND '" & TDate & "' AND EXPIRY IS NULL order by act_date des
c")
If Not rs3.EOF Then
ACTDT1 = Format(rs3("ACT_DATE"), "DD-MMM-YYYY")
If Trim(rs3("ACT_DATE")) <> "" Then
CUS_FILLED_DATE = Format(rs3("ACT_DATE"), "DD-MMM-YYYY")

actdate = Format(rs3("ACT_DATE"), "DD-MMM-YYYY")


Else
CUS_FILLED_DATE = ""
actdate = ""
End If
End If
End If
'code over by senba
If rr("MOBILENO") <> "" Then
Set rs1 = con.OpenResultset("SELECT DISCODE,DISNAME FROM TN_AIRTEL_I
NDEX_PREPAID_ENTRY WHERE MOBILENO='" & rr("MOBILENO") & "'")
If Not rs1.EOF Then
DISNO = " "
If Trim(rs1("DISCODE")) <> "" Then
DISNO = rs1("DISCODE")
Else
DISNO = " "
End If
If Trim(rs1("DISNAME")) <> "" Then
''DISNAME = Replace(Replace(rs2("DIST_NAME"), "|", ""), "'", "")
DISNAME = Replace(Replace(rs1("DISNAME"), "|", ""), "'", "")
Else
DISNAME = " "
End If
End If
End If

Set rs2 = con.OpenResultset("SELECT * FROM tn_airtel_disname_email WHERE


DISNAME='" & DISNAME & "'")
If Not rs2.EOF Then
If Trim(rs2("ZONE")) <> "" Then
''UPCOUNTRY = rs2("ZONE_TYPE")
Upcountry = rs2("ZONE")
Else
Upcountry = ""
End If
End If
Upcountry = ""
'If Trim(rr("NATIONALITY")) <> "" Then
''DISNO = rs2("MACNO")
'NATIONALITY = rr("NATIONALITY")
'Else
'NATIONALITY = "NA"
'End If
'If Trim(rr("DIS_NAME")) <> "" Then
''DISNAME = Replace(Replace(rs2("DIST_NAME"), "|", ""), "'", "")
'DISNAME = Replace(Replace(rr("DIS_NAME"), "|", ""), "'", "")
' Else
' DISNAME = "NA"
'End If
zone = ""
If Trim(rr("REGION")) <> "" Then
''zone = Replace(Replace(rs2("REGION"), "'", ""), "|", "")
zone = Replace(Replace(rr("REGION"), "'", ""), "|", "")
Else
zone = ""
End If
''Else
'UPCOUNTRY = "NA"
'DISNO = "NA"
' DISNAME = "NA"
'zone = "NA"
''End If

''If Trim(rr("RET_MOBNO")) <> "" Then


'' RETILER_MOBILENO = rr("RET_MOBNO")
''Else
RETILER_MOBILENO = ""
'' End If

''If Trim(rr("ret_name")) <> "" Then


''RETILER_NAME = Replace(Replace(rr("ret_name"), "'", ""), "|", "")
''Else
RETILER_NAME = ""
'' End If

If rr("PREFIX") <> "" Then


PREFIX = rr("PREFIX")
Else
PREFIX = ""
End If
If rr("GENDER") <> "" Then
GENDER = rr("GENDER")
Else
GENDER = ""
End If
If Trim(rr("NAME")) <> "" Then
CFNAME = Replace(Replace(rr("Name"), "|", ""), "'", "")
Else
CFNAME = ""
End If
CMNAME = ""
If rr("LAST_NAME") <> "" Then
CLNAME = Replace(Replace(rr("LAST_NAME"), "|", ""), "'", "")
Else
CLNAME = ""
End If
If rr("FH_NAME") <> "" Then
CFATHER_FNAME = Replace(Replace(rr("FH_NAME"), "|", ""), "'", "")
Else
CFATHER_FNAME = ""
End If
CFATHER_MNAME = ""
CFATHER_LNAME = ""

If Trim(rr("ADD1")) <> "" Then


RES_ADDRESS1 = Replace(Replace(rr("ADD1"), "|", ""), "'", "")
Else
RES_ADDRESS1 = ""
End If
If Trim(rr("ADD2")) <> "" Then
RES_ADDRESS2 = Replace(Replace(rr("ADD2"), "|", ""), "'", "")
Else
RES_ADDRESS2 = ""
End If
If Trim(rr("ADD3")) <> "" Then
RES_ADDRESS3 = Replace(Replace(rr("ADD3"), "|", ""), "'", "")
Else
RES_ADDRESS3 = ""
End If

If Trim(rr("CITY")) <> "" Then


RES_CITY = Replace(Replace(rr("CITY"), "|", ""), "'", "")
Else
RES_CITY = ""
End If
If Trim(rr("PIN")) <> "" Then
RES_PINCODE = Replace(Replace(rr("PIN"), "|", ""), "'", "")
Else
RES_PINCODE = 0
End If
If Trim(rr("PHONE")) <> "" Then
ALT_CONTACTNO = Replace(Replace(rr("PHONE"), "|", ""), "'", "")
Else
ALT_CONTACTNO = ""
End If
If RES_ADDRESS1 = "" And RES_ADDRESS2 = "" And RES_ADDRESS3 = "" And RES
_CITY = "" Then
If Trim(rr("ADD1_O")) <> "" Then
RES_ADDRESS1 = Replace(Replace(rr("ADD1_O"), "|", ""), "'", "")
Else
RES_ADDRESS1 = ""
End If
If Trim(rr("ADD2_O")) <> "" Then
RES_ADDRESS2 = Replace(Replace(rr("ADD2_O"), "|", ""), "'", "")
Else
RES_ADDRESS2 = ""
End If
If Trim(rr("ADD3_O")) <> "" Then
RES_ADDRESS3 = Replace(Replace(rr("ADD3_O"), "|", ""), "'", "")
Else
RES_ADDRESS3 = ""
End If
If Trim(rr("P_CITY")) <> "" Then
RES_CITY = Replace(Replace(rr("P_CITY"), "|", ""), "'", "")
Else
RES_CITY = ""
End If
If IsNull(Trim(rr("P_PIN"))) = False Then
RES_PINCODE = Replace(Replace(rr("P_PIN"), "|", ""), "'", "")
Else
RES_PINCODE = 0
End If
End If
If (RES_PINCODE_1 = "999999") Or (RES_PINCODE_1 = "666666") Then
RES_PINCODE_1 = 0
ElseIf UCase(DOB_1) = "01-JAN-1900" Then
GoTo GG
End If
If Trim(rr("TELECALL")) <> "" Then
stat = rr("TELECALL")
Else
stat = ""
End If
'''''--------------------
If IsNull(Trim(rr("DATE_ENTRY"))) = False Then
UPDATE_DATE = Format(rr("DATE_ENTRY"), "DD/MM/YYYY")
Else
UPDATE_DATE = ""
End If
If Trim(rr("FLADDR")) <> "" Then
FLADDR = Replace(Replace(rr("FLADDR"), "|", ""), "'", "")
If Trim(FLADDR) = "FOREIGN" Then
NATIONALITY = "FOREIGN"
Else
NATIONALITY = "INDIAN"
End If
Else
FLADDR = ""
End If
If IsNull(rr("MARITAL")) = False Then
MARITAL_STATUS = rr("MARITAL")
Else
MARITAL_STATUS = ""
End If
If rr("DOB") <> "" Then
DATE_OF_BIRTH = Format(rr("DOB"), "DD/MM/YYYY")
Else
BDT = "01-JAN-1900"
DATE_OF_BIRTH = Format(BDT, "DD/MM/YYYY")
End If
If IsNull(rr("PANNO")) = False Then
PAN_NO = rr("PANNO")
Else
PAN_NO = ""
End If

If IsNull(rr("EMAIL_ID")) = False And rr("EMAIL_ID") <> "|" Then


EMAIL = rr("EMAIL_ID")
Else
EMAIL = ""
End If
If Trim(rr("ENCLOSE")) = "DL" Then
If (Trim(rr("ENCNO"))) <> "" Then
DRIVING_LICENCENO = Replace(Trim(rr("ENCNO")), "|", "")
Else
DRIVING_LICENCENO = ""
End If
Else
DRIVING_LICENCENO = ""
End If
If IsNull(rr("PANNO")) = False Then
PHOTOID_DETAILS = rr("PANNO")
Else
PHOTOID_DETAILS = ""
End If

If Trim(rr("ADD1_O")) <> "" Then


PERM_ADDRESS1 = Replace(Replace(rr("ADD1_O"), "|", ""), "'", "")
Else
PERM_ADDRESS1 = ""
End If
If Trim(rr("ADD2_O")) <> "" Then
PERM_ADDRESS2 = Replace(Replace(rr("ADD2_O"), "|", ""), "'", "")
Else
PERM_ADDRESS2 = ""
End If
If Trim(rr("ADD3_O")) <> "" Then
PERM_ADDRESS3 = Replace(Replace(rr("ADD3_O"), "|", ""), "'", "")
Else
PERM_ADDRESS3 = ""
End If
If Trim(rr("P_CITY")) <> "" Then
perm_city = Replace(Replace(rr("P_CITY"), "|", ""), "'", "")
Else
perm_city = ""
End If
If IsNull(rr("MNP_UPC_CODE")) = False Then
mnpcode = rr("MNP_UPC_CODE")
Else
mnpcode = ""
End If

You might also like