[Zope] ZOPE : SQL methods

2001-01-12 Thread K H Subrahmanyan

hi,

  I am using zope and gadfly for my project.
but while using the SQL methods, I get the error if I use the "like" option.

E.g..   select  *
from  table
where
 Emp_name   like   "*rama*"

I will get the following error.



 Zope Error
Zope has encountered an error while publishing this resource.
Error Type: SyntaxError
Error Value: unexpected token sequence.near :: 'est\012where \012Emp_name'*'
like "*rama*"' *** current state = 57 expects:
'HAVING', 'UNION', 'GROUP', 'VARCHAR', 'DESC', 'SELECT', 'ORDER', 'WHERE',
'AS', 'EXCEPT', '*', 'IN', 'INTERSECT', 'FLOAT', '+', '(', ')', '.', '/',
',', '-', 'AND', 'FROM', '*', ';', 'INTEGER', 'NOT', '', 'OR', '=',
'BETWEEN', 'ASC', '', 'VALUES', ('nomatch1',) current token = ((-8,
'user_defined_name'), 'LIKE')



kindly help
thanks
bye
subrahmanyan.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] ZOPE : SQL methods

2001-01-12 Thread Dieter Maurer

K H Subrahmanyan writes:
I am using zope and gadfly for my project.
  but while using the SQL methods, I get the error if I use the "like" option.
  
  E.g..   select  *
  from  table
  where
   Emp_name   like   "*rama*"
  
  I will get the following error.
Maybe, you should look at an SQL book or other SQL description...

 1. strings are surrounded by '...' not "..."
 2. the "match sequence" wildcard is "%" not "*"


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )