Can I or am I creating the Variable GSE correctly? The code follows.
strSqlCd = "SELECT RPTYEAR , "
strSqlCd = strSqlCd + "'FNMA' AS [GSE], "
strSqlCd = strSqlCd + "STATE, "
strSqlCd = strSqlCd + "NSERV AS [SERVED UNDERSERVED], "
strSqlCd = strSqlCd + "FIRST AS [BUYER TYPE], "
strSqlCd = strSqlCd + "RACE AS [ETHNIC GROUP], "
strSqlCd = strSqlCd + "GEND AS [GENDER], "
strSqlCd = strSqlCd + "BORATIO AS [BORROWER RATIO], "
strSqlCd = strSqlCd + "SUM(COUNT) AS [NumberLoans] "
strSqlCd = strSqlCd + "FROM tblFNMA1996 "
strSqlCd = strSqlCd + " WHERE STATEFP = '06' AND"
strSqlCd = strSqlCd + " GEND = 'MALE' AND"
strSqlCd = strSqlCd + " FIRST = 'FIRST' AND"
strSqlCd = strSqlCd + " RACE = 'WHT'"
strSqlCd = strSqlCd + " GROUP BY RPTYEAR, GSE, STATE, NSERV, FIRST, "
strSqlCd = strSqlCd + " RACE, GEND, BORATIO "
strSqlCd = strSqlCd + " ORDER BY NSERV, FIRST, BORATIO;"
Thanks in advance.
strSqlCd = "SELECT RPTYEAR , "
strSqlCd = strSqlCd + "'FNMA' AS [GSE], "
strSqlCd = strSqlCd + "STATE, "
strSqlCd = strSqlCd + "NSERV AS [SERVED UNDERSERVED], "
strSqlCd = strSqlCd + "FIRST AS [BUYER TYPE], "
strSqlCd = strSqlCd + "RACE AS [ETHNIC GROUP], "
strSqlCd = strSqlCd + "GEND AS [GENDER], "
strSqlCd = strSqlCd + "BORATIO AS [BORROWER RATIO], "
strSqlCd = strSqlCd + "SUM(COUNT) AS [NumberLoans] "
strSqlCd = strSqlCd + "FROM tblFNMA1996 "
strSqlCd = strSqlCd + " WHERE STATEFP = '06' AND"
strSqlCd = strSqlCd + " GEND = 'MALE' AND"
strSqlCd = strSqlCd + " FIRST = 'FIRST' AND"
strSqlCd = strSqlCd + " RACE = 'WHT'"
strSqlCd = strSqlCd + " GROUP BY RPTYEAR, GSE, STATE, NSERV, FIRST, "
strSqlCd = strSqlCd + " RACE, GEND, BORATIO "
strSqlCd = strSqlCd + " ORDER BY NSERV, FIRST, BORATIO;"
Thanks in advance.