darthsiddeous
Programmer
I'm a junior programmer trying to get into a company and they sent me a database to work on. I can't get the queries to work. I'll give a sample of what is there. Could someone please explain what it's doing?? Thank you!!<br>
<br>
SELECT (TblMembership.PrefixMember) & UCase(TblMembership.LastName) & ", " & StrConv(TblMembership.FirstName,3) & " " & IIf(IsNull(TblMembership.MiddleName),"",UCase(Mid(Trim(TblMembership.MiddleName),1,1)) & ". " AS NAME, IIf(IsNull(TblAddress.Address_1),"",TblAddress.Address_1) AS Address, IIf(IsNull(TblAddress.Address_2),"",TblAddress.Address_2) AS Address, IIf(IsNull(TblAddress.Address_3),"",TblAddress.Address_3) AS Address1, IIf(IsNull(TblAddress.City),"",TblAddress.City & ", " & IIf(IsNull(TblAddress.[Province/State]),"",TblAddress.[Province/State] & ", " & IIf(IsNull(TblAddress.Country),"",TblAddress.Country & " " & IIf(IsNull(TblAddress.[Postal/Zip]),"",TblAddress.[Postal/Zip]) AS Address2, IIf(IsNull(TblAddress.[Area_Code]),"",TblAddress.[Area_Code] & "-" & IIf(IsNull(TblAddress.Telephone),"",TblAddress.Telephone & "; " & IIf(IsNull(TblAddress.Extension),"","Ext. " & TblAddress.Extension & ", " & IIf(IsNull(TblAddress.Fax),"","Fax: " & TblAddress.Fax) AS Phone, IIf(IsNull(TblAddress.[E-mail]),"","E-mail: " & TblAddress.[E-mail]) AS Email<br>
FROM TblMembership, TblAddress, TblMember_Type<br>
WHERE (((TblMembership.MemberID)=[TblAddress].[MemberID] And (TblMembership.MemberID)=[TblMember_Type].[MemberID]) AND ((TblAddress.AdressType) In ("Primary","Secondary") AND ((TblMember_Type.MemberType)="Member");<br>
<br>
<br>
<br>
SELECT (TblMembership.PrefixMember) & UCase(TblMembership.LastName) & ", " & StrConv(TblMembership.FirstName,3) & " " & IIf(IsNull(TblMembership.MiddleName),"",UCase(Mid(Trim(TblMembership.MiddleName),1,1)) & ". " AS NAME, IIf(IsNull(TblAddress.Address_1),"",TblAddress.Address_1) AS Address, IIf(IsNull(TblAddress.Address_2),"",TblAddress.Address_2) AS Address, IIf(IsNull(TblAddress.Address_3),"",TblAddress.Address_3) AS Address1, IIf(IsNull(TblAddress.City),"",TblAddress.City & ", " & IIf(IsNull(TblAddress.[Province/State]),"",TblAddress.[Province/State] & ", " & IIf(IsNull(TblAddress.Country),"",TblAddress.Country & " " & IIf(IsNull(TblAddress.[Postal/Zip]),"",TblAddress.[Postal/Zip]) AS Address2, IIf(IsNull(TblAddress.[Area_Code]),"",TblAddress.[Area_Code] & "-" & IIf(IsNull(TblAddress.Telephone),"",TblAddress.Telephone & "; " & IIf(IsNull(TblAddress.Extension),"","Ext. " & TblAddress.Extension & ", " & IIf(IsNull(TblAddress.Fax),"","Fax: " & TblAddress.Fax) AS Phone, IIf(IsNull(TblAddress.[E-mail]),"","E-mail: " & TblAddress.[E-mail]) AS Email<br>
FROM TblMembership, TblAddress, TblMember_Type<br>
WHERE (((TblMembership.MemberID)=[TblAddress].[MemberID] And (TblMembership.MemberID)=[TblMember_Type].[MemberID]) AND ((TblAddress.AdressType) In ("Primary","Secondary") AND ((TblMember_Type.MemberType)="Member");<br>
<br>
<br>