The following section, from an sql query, runs perfectly in Microsoft SQL Server Management Studio:
The table column "line_no" exists in one of the linked tables that is part of the query but the column "the_sectio n" is being created to hold data only for the query.
When I try to run this in Access 2007 I get the following error message:
The Microsoft Office Access database engine could not find 'the_section=(c ase when line_no=101 then 1 when line_no between 102
and 105 then 2 when line_no between 106
and 112 then 2 when line_no between 201
and 219 then 3 when line_no between 703
and 704 then 2 when line_no between 801
and 822 then'. Make sure the object exists and that you spell its name and the path name correctly.
Can someone please help?
Code:
the_section=(case when line_no= 101 then 1 when line_no between 102 and 105 then 2 when line_no between 106 and 112 then 2 when line_no between 201 and 219 then 3 when line_no between 703 and 704 then 2 when line_no between 801 and 822 then 2 when line_no between 901 and 910 then 2 when line_no between 1001 and 1016 then 2 when line_no between 1101 and 1128 then 2 when line_no between 1201 and 1210 then 2 when line_no between 1301 and 1310 then 2 else 3 end),
When I try to run this in Access 2007 I get the following error message:
The Microsoft Office Access database engine could not find 'the_section=(c ase when line_no=101 then 1 when line_no between 102
and 105 then 2 when line_no between 106
and 112 then 2 when line_no between 201
and 219 then 3 when line_no between 703
and 704 then 2 when line_no between 801
and 822 then'. Make sure the object exists and that you spell its name and the path name correctly.
Can someone please help?
Comment