Maximum length of SQL

A

Andrew

Hi,

I'm trying to build a query in Excel (2007) to get data from Access (2000).

The following SQL works (230 characters):

SELECT tbl_Comm_Data.* FROM `G:\06_ip\Andrew\WIP\POL\Andrews
Test1`.tbl_Comm_Data tbl_Comm_Data WHERE (tbl_Comm_Data.DEPT_NO='902' AND
((tbl_Comm_Data.REPORT_PERIOD='FY09 P01 JUL') OR
(tbl_Comm_Data.REPORT_PERIOD='FY09 P02 AUG')))

but the following doesn't (278 characters) :
SELECT tbl_Comm_Data.* FROM `G:\06_ip\Andrew\WIP\POL\Andrews
Test1`.tbl_Comm_Data tbl_Comm_Data WHERE (tbl_Comm_Data.DEPT_NO='902' AND
((tbl_Comm_Data.REPORT_PERIOD='FY09 P01 JUL') OR
(tbl_Comm_Data.REPORT_PERIOD='FY09 P02 AUG') OR
(tbl_Comm_Data.REPORT_PERIOD='FY09 P03 SEP')))

Is the maximum length 255? Is there a solution?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top