View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andrew Andrew is offline
external usenet poster
 
Posts: 358
Default Maximum length of SQL

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?

--
Andrew