Friday, 15 March 2013

Error with queries with more than 2 union statements access -



Error with queries with more than 2 union statements access -

i having problem union queries. when seek utilize more 2 union statements gate error - "the microsoft access database engine not find object ". create sure object name exists , spell path name correctly." sql code is:

select [pt info 1].idno, [pt info 1].pt_name, [expected visit date modified].[visit day], [expected visit date modified].[visit time], [pt info 1].[visit_14d_st] status [expected visit date modified] inner bring together [pt info 1] on [expected visit date modified].idno = [pt info 1].idno ((([expected visit date modified].[visit time])="day 14") , (not ([pt info 1].[visit_14d_st])="data entered" , not ([pt info 1].[visit_14d_st])="missed visit")); union select [pt info 1].idno, [pt info 1].pt_name, [expected visit date modified].[visit day], [expected visit date modified].[visit time], [pt info 1].[visit_28d_st] status [expected visit date modified] inner bring together [pt info 1] on [expected visit date modified].idno = [pt info 1].idno ((([expected visit date modified].[visit time])="day 28") , (not ([pt info 1].[visit_28d_st])="data entered" , not ([pt info 1].[visit_28d_st])="missed visit")); union select [pt info 1].idno, [pt info 1].pt_name, [expected visit date modified].[visit day], [expected visit date modified].[visit time], [pt info 1].[visit_42d_st] status [expected visit date modified] inner bring together [pt info 1] on [expected visit date modified].idno = [pt info 1].idno ((([expected visit date modified].[visit time])="day 42") , (not ([pt info 1].[visit_42d_st])="data entered" , not ([pt info 1].[visit_42d_st])="missed visit"));

the issue query works fine of 2 queries not three. totally stuck this. help please. thanks.

union queries can tough read, , tough check typos. suggest set each of statements saved queries (e.g. "qryvisit_day14", "qryvisit_day28"). create union query this:

select * qryvisit_day14 union select * qryvisit_day28 union select * qryvisit_day42

ms-access

No comments:

Post a Comment