Invalid SQL Statement



Hi. Does anyone have the patience and knowledge to determine what's
wrong with the following SQL statement (that is being passed to my
MAILMERGE routine)? I haven't a clue. The error message doesn't really
help. All is says is that the SQL statement is not valid. Does it have
too many characters? The length of the statement is 1254.

SELECT tblDogTitles.dogtitleID, tblDogTitles.dogregnbr,
tblDogTitles.processeddt, tblDogTitles.multiplier,
Day(tblTrials.trialdt) & ' ' & MonthName(Month(tblTrials.trialdt)) & ' '
& Year(tblTrials.trialdt) AS outtrialdt, tblTitles.title,
tblTitles.titleabbrev, tblDogs.formalname, tblPeople.fname & ('
'+tblPeople.midinit+'.') & ' ' & tblPeople.lname & ('
'+tblPeople.suffix+'.') AS owner, tblPeople.altperson AS altowner,
IIF(titleabbrev = 'UDX-H' OR titleabbrev = 'OTCH-H',' ',' ' &
tblClasses.class & ' Class ') AS classtxt, IFF(mulitplier > 1,
multiplier, ' ') AS titlesuffix, tblUserSettings.uval FROM
tblUserSettings, tblTrials INNER JOIN (((tblClasses INNER JOIN
tblTrialClass ON tblClasses.classID = tblTrialClass.classID) INNER JOIN
tblTitles ON tblClasses.classID = tblTitles.classID) INNER JOIN
(tblPeople INNER JOIN (tblDogs INNER JOIN tblDogTitles ON
tblDogs.dogregnbr = tblDogTitles.dogregnbr) ON tblPeople.peopleID =
tblDogs.peopleID) ON (tblTrialClass.trialclassID =
tblDogTitles.trialclassID) AND (tblTitle
s.titleID = tblDogTitles.titleID)) ON tblTrials.trialID =
tblTrialClass.trialID WHERE (tblDogTitles.processeddt = #9/28/2007
2:42:32 PM#) AND tblUserSettings.uvar = 'U_Coordinator' ORDER BY
tblDogTitles.dogregnbr, tblTitles.titleID


Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages

  • Re: Why db.OpenRecordset("SQL STRING HERE", dbOpenDynaset) is not working ?
    ... Sub Tester() ... Dim r As Recordset ... FROM tblBatches INNER JOIN (tblClusters INNER JOIN ((tblAdmin INNER ... you have a where statement that looks the same as the where statement in your SQL statement. ...
    (comp.databases.ms-access)
  • Re: Slow GROUP BY
    ... ' 'create primary key ... PunchList INNER JOIN Lot ON PunchList.LotId = Lot.Id INNER JOIN PunchItem ON ... the exact schema of the parent and child table ... your exact SQL statement that includes the GROUP BY ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Delete Query
    ... Susan ... >> A Delete Query needs to have the table specified. ... >> FROM ALMOST INNER JOIN 2_073105 ... >>> Below is the sql statement. ...
    (microsoft.public.access.queries)
  • Re: "Where" column limits records regardless of row
    ... inner join and none of the four fields used have any null values. ... GROUP BY., [qry SAME STORES IN IPT ... > If neither of those issues apply, post the SQL statement (SQL View on View ...
    (microsoft.public.access.queries)
  • SQL and recordset.Open (still having problems)
    ... SELECT ACCOUNT_LIST.COMPLEMENTOR FROM REP_LIST INNER JOIN ... I have the SQL statement variable declared as: ... >> strsearch variable. ... The error is telling you that the SQL command is ...
    (microsoft.public.access.modulesdaovba)