Re: [Zope] left(string, n) equivalent (newbie q.)

2000-06-15 Thread Graham Chiu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In article <000901bfd712$42628800$[EMAIL PROTECTED]>, Luis Cortes
<[EMAIL PROTECTED]> writes
>You should be able to use python's slice like so:
>
>
>...
>
>where "word" is the variable you want to use only 4 characters of.
>
>Hope this helps,

But he is referring to a zsqlmethod, and you should be able to pass sql
thru.

Perhaps if he posts the zslqmethod..  Maybe it's an Access thing.

- -- 
Regards,  Graham Chiu
gchiucompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

-BEGIN PGP SIGNATURE-
Version: PGPsdk version 1.7.1

iQA/AwUBOUjGTrTRdIWzaLpMEQL1IACgp1lkupw3pCyxkAbVJ6melhuv2/8AoJ78
U//cKJwG0QQsCwyWWHIM/LbL
=e+7V
-END PGP SIGNATURE-

___
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] left(string, n) equivalent (newbie q.)

2000-06-15 Thread Luis Cortes

You should be able to use python's slice like so:


...

where "word" is the variable you want to use only 4 characters of.

Hope this helps,
bye.

- Original Message -
From: joel grimes <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 15, 2000 3:18 PM
Subject: [Zope] left(string, n) equivalent (newbie q.)


> Pardon my ignorance, I'm coming from a VB/Access background.
>
> I need to find an equivalent to using left(string, 4) in a zope SQL
method's
> select query.  My SQL book
> says I can use SUBSTRING(string, 1, 4) in a query but no luck.  I'm
> connecting to an Access database.
>
> btw - this mail list ROCKS!  I've never waited more than 10 minutes for a
> response.
>
> Thanks
> 
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
> ___
> 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 )


___
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 )




[Zope] left(string, n) equivalent (newbie q.)

2000-06-15 Thread joel grimes

Pardon my ignorance, I'm coming from a VB/Access background.

I need to find an equivalent to using left(string, 4) in a zope SQL method's 
select query.  My SQL book
says I can use SUBSTRING(string, 1, 4) in a query but no luck.  I'm  
connecting to an Access database.

btw - this mail list ROCKS!  I've never waited more than 10 minutes for a 
response.

Thanks

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
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 )