Hi there,

I found a way to do it with the following query

select * from theTable
where 'test' like concat( theColumn, '%' );

Thanks for the help,

Andre


--- Andre Kirchner <[EMAIL PROTECTED]> wrote:
> thanks for the help, but what I really want is to
> select all the values that are a substring of 'test'
> as  't', 'te', 'tes' and 'test', and so I was trying
> the query
> 
> select * from theTable
> where ( theColumn || '%' ) like 'test';
> 
> I think my previous email as a litle bit confusing.
> Sorry for that :-)
> 
> Andre
> 
> --- Jennifer Goodie <[EMAIL PROTECTED]>
> wrote:
> > select * from theTable where theColumn like
> 'test%';
> > or
> > select * from theTable where LEFT(theColumn,4) =
> > 'test';
> > 
> > depending on the table structure and data and
> > indexing, etc. I have seen a
> > performance difference between the two, test and
> see
> > which works best for
> > your application.
> > 
> > 
> > Hi there,
> > 
> > how can I query all the values starting with
> 'test'?
> > I tried the following query, but it didn't work
> > 
> > select * from theTable where ( ( theColumn || '%'
> )
> > like 'test' );
> > 
> > Thanks,
> > 
> > Andre
> > mySQL
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list
> > archive)
> > 
> > To request this thread, e-mail
> > <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> >
>
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try:
> > http://lists.mysql.com/php/unsubscribe.php
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 
>
---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list
> archive)
> 
> To request this thread, e-mail
> <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
>
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
> 


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to