I work for a school district and am *again* trying to make something with no $$. I have MySQL runnning on a Win 2k box and am accessing data through MyODBC via VBA. What I am trying to do is do is to create a temporary table based on an inner join on two data tables on a common ID field, do some math, and return the result to Excel 2000.
Everything works perfectly if I do it in MS Query, but I can't get anything out if I try the same statement in VBA, although I can get all of the individual pieces to work. It appears that there is a maximum number of characters (?) or the combination of SQL commands that is giving VBA (and me) heartburn.
Here is the statement. Thanks for any assistance / ideas you can provide.
CREATE TABLE SAMPLE AS
SELECT star02.Teacher AS '02_Teacher', star02.StudentID, star02.TotalReadingNCE AS '02_TR_NCE', star02.ReadingVocNCE AS '02_ReadVoc_NCE', star02.ReadingCompNCE AS '02_ReadComp_NCE', star02.TotalMathNCE AS '02_TM_NCE', star02.ProblemSolvNCE AS '02_ProbSolv_NCE', star02.ProceduresNCE AS '02_Procedures_NCE', star02.LanguageNCE AS '02_Language_NCE', star02.SpellingNCE AS '02_Spelling_NCE', star02.ScienceNCE AS '02_Science_NCE', star02.SocialSciNCE AS '02_SocialSci_NCE', star01.TotalReadingNCE AS '01_TR_NCE', star01.ReadingVocNCE AS '01_ReadVoc_NCE', star01.ReadingCompNCE AS '01_ReadComp_NCE', star01.TotalMathNCE AS '01_TM_NCE', star01.ProblemSolvNCE AS '01_ProbSolv_NCE', star01.ProceduresNCE AS '01_Procedures_NCE', star01.LanguageNCE AS '01_Language_NCE', star01.SpellingNCE AS '01_Spelling_NCE', star01.ScienceNCE AS '01_Science_NCE', star01.SocialSciNCE AS '01_SocialSci_NCE' FROM (star02, star01) WHERE (star02.StudentID = star01.StudentID) AND (star02.Teacher Like "%Wol%") AND (star02.TotalReadingNCE>0) AND (star02.TotalMathNCE>0)