Matt Froncek wrote:
Martin,

Thank you for looking into this. The SQLite3.exe I tested with was 3.1.3.
And yes the SQL statement works fine as it. If you add one more nested OR to
the SQL statement then it stops working. I don't get a stack overflow like I
do in the ODBC driver I was testing with but it errors with a syntax error
about the "=".

Change the last to lines to:
      Customer.FullName = 'Okami' OR (
      Customer.FullName = 'Okami2' OR (
      Customer.FullName = 'Quickspice, Inc.')))))))))))))))))))))))))))))

OK, if I add another line I do get an error with sqlite3 v3.3.11

> SQL error near line 46: parser stack overflow

I think you said that you generate the queries? If so, do you have to nest so many nested ORs? I'm no SQL expert but

... AND  ( Customer.FullName in (
     'Amazon.com.ksdc, Inc. - Campbellsville',
     'Amazon.com.ksdc, Inc. - Coffeyville',
     'Amazon.com.ksdc, Inc. - Fernley',
     'Arizona Select',
     'ATW - Cobb Dist.',
     'SunOpta Food Distribution Group',
     'Callaway Consumer Products, LLC',
     'Cedarlane Natural Foods',
     'City Glatt, Inc.',
     'Columbus Distributing, Inc.',
     'Cost Plus World Markets-West',
     'DeKalb Farmers Market',
     'DPI-Midwest',
     'DPI-Northwest',
     'DPI-Rocky Mountain',
     'DPI-West',
     'Exel Pak',
     'Falcon Trading Co.',
     'Foodguys',
     'Foodology',
     'Gourmet Awards - Milwaukee',
     'Kehe Foods',
     'Marc Popcorn Company',
     'Marukai Markets',
     'Matsukas Food Company',
     'McCain Foods USA, Inc.',
     'Okami',
     'Okami2',
     'Quickspice, Inc.'))
  )

appears to do the same job and a quick test suggests that it does. I don't what limits (if any) there would be with this approach but I suspect Dr Hipp would rather you fix your SQL generator than have to "fix" his parser. ;)

Martin

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to