Query operator please help! 
Author Message
 Query operator please help!

If you are using TQuery components, just do

Select * from yourtable
        Where Name Like 'String%'

The % allows the rest of the string to be anything.

If you are using TTable components, consider to use TQuery. Set the
property RequestLive to True if you need to update data.

EBR

On Fri, 15 Aug 1997 15:45:21 -0500, Jose Sebastian Battig

Quote:

>Anyone know wich is the operator that i need to use to indicate in a
>filter expression that a given field of a table starts with a string.
>What i need to do is a search like the one that does FindNearest but in
>a field that is not the key of the table, in my case i have a Code as a
>key and a Name field as another field. I want to do a search in the Name
>field, and position the cursor in the field that first matches the
>creiteria. The table as an secondary index in the name field. Another
>important think is that i cannot change the index of the table because
>it's involved in a relation, so i have to do the search taking in
>account the realation.

>Thanks in advance.
>--
>Jose Sebastian Battig



Wed, 18 Jun 1902 08:00:00 GMT  
 Query operator please help!

Anyone know wich is the operator that i need to use to indicate in a
filter expression that a given field of a table starts with a string.
What i need to do is a search like the one that does FindNearest but in
a field that is not the key of the table, in my case i have a Code as a
key and a Name field as another field. I want to do a search in the Name
field, and position the cursor in the field that first matches the
creiteria. The table as an secondary index in the name field. Another
important think is that i cannot change the index of the table because
it's involved in a relation, so i have to do the search taking in
account the realation.

Thanks in advance.
--
Jose Sebastian Battig

--------------------------------------------------

Important:

Please, when replying to me delete the "NOSPAM-"
part of the "reply to" e-mail address.

Por favor cuando me contestes usando "reply" borra
 la parte de la direccion que dice "NOSPAM-".



Wed, 18 Jun 1902 08:00:00 GMT  
 Query operator please help!

Quote:

> If you are using TQuery components, just do

> Select * from yourtable
>         Where Name Like 'String%'

> The % allows the rest of the string to be anything.

> If you are using TTable components, consider to use TQuery. Set the
> property RequestLive to True if you need to update data.

> EBR

Thanks for the help. I'll try it.  

Jose Sebastian Battig

--------------------------------------------------

Important:

Please, when replying to me delete the "NOSPAM-"
part of the "reply to" e-mail address.

Por favor cuando me contestes usando "reply" borra
 la parte de la direccion que dice "NOSPAM-".



Wed, 18 Jun 1902 08:00:00 GMT  
 Query operator please help!

Quote:

> Anyone know wich is the operator that i need to use to indicate in a
> filter expression that a given field of a table starts with a string.
> What i need to do is a search like the one that does FindNearest but in
> a field that is not the key of the table, in my case i have a Code as a
> key and a Name field as another field.

--
Try something like

 '<field> LIKE "STRING%"' (will select all occurrences starting with the
letters 'STRING')

or

 '<field> LIKE "%STRING"' (quite straightforward, isn't it?)

Hope that helps!
     ____
__/\/ando
Please reply by post and e-mail or just e-mail
Delete the -nospam- from my reply-to address, thank you!



Wed, 18 Jun 1902 08:00:00 GMT  
 Query operator please help!

Nando

Try this if you are using interbase

SELECT NAME FROM CUSTOMER WHERE
NAME STARTING WITH :SEARCHITEM

When you use like operator it does not use an index if that field has one

Will Wilson
Financial Dynamics

Solutions that work



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Limiting the number of records in a query (Urgent - please help)

2. please help me on MULTIPLE TABLE QUERIES

3. Please HELP with Query

4. Please Help: How to make a cross table query in a Oracle Database

5. Multiple Table Queries with Live Datasets..Please Help!!

6. Please help with organize Query and Form

7. Please Help Me!! Access Query Problem

8. Help with Query Please!!!

9. SQL query problems - please help

10. HELP needed - OVERLOADING OPERATORS????

11. logical operators in pascal, help!

12. HELP needed - OVERLOADING OPERATORS????

 

 
Powered by phpBB® Forum Software