Yep. You are right %% instead of \%
thanks
-- jacek

On Jun 11, 9:59 am, Andreas Jung <[EMAIL PROTECTED]> wrote:
> --On 11. Juni 2008 17:55:44 +0100 King Simon-NFHD78
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> >> -----Original Message-----
> >> From: [email protected] [mailto:[EMAIL PROTECTED]
> > On Behalf Of jack2318
> >> Sent: 11 June 2008 17:50
> >> To: sqlalchemy
> >> Subject: [sqlalchemy] text
>
> >> I tried very simple test:
>
> >> s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something'")
> >> count = conn.execute(s).fetchone()
>
> >> and this produced error
> >> Unexpected error: <type 'exceptions.TypeError'> not enough arguments
> >> for format string
>
> >> not big deal there is few way around but just for completeness I
> >> believe it should work (no parameters to expand)
>
> >> regards
> >> -- jacek
> >> PS: I am using mysql
>
> > Are you sure you didn't try:
>
> > s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something%'")
>
> '%' must be quoted as '%%' in Python.
>
> -aj
>
>  application_pgp-signature_part
> 1KDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to