(Msg. 1) Posted: Sat Dec 01, 2007 3:01 am
Post subject: Can't get msquery to do a simple date > #07/07/07# Archived from groups: microsoft>public>excel>querydao (more info?)
Produces a Did not expect BY after select statement error
SELECT prescinf.contno, brick.descript, trim(brick.descript)+"
"+trim(last)+" "+trim(first) AS 'Xname', week(call.calldate) AS Week,
month(call.calldate) AS 'month', Year(call.calldate) AS 'Year',
call.consultant ORDER BY week, month FROM contact contact LEFT OUTER
JOIN call call ON contact.contno = call.contno AND call.status =
"Completed" AND(Call.type ='A Call' OR Call.type = 'B Call') AND
YEAR(call.calldate) = 2007 AND call.consultant IN ("BDF") , prescinf
prescinf, brick brick WHERE pres.contno = contact.contno AND
contact.brick = brick.brick AND ((prescinf.rxpot='GREEN') AND
(presc.name='CXV') OR (prescinf.rxpot='YELLOW') AND (presc.name='CXV'))
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum