Board index » delphi » BDE SQL Is Case Sensitive Only ?

BDE SQL Is Case Sensitive Only ?

If I type

   SELECT * FROM Employees WHERE FirstName LIKE 'Smith'

with a Tquery component the BDE retrieve only the'Smith'
FirstNames of an Employees list.

What should I type for obtain:

smith
Smithson
Smith

Tanks to all.

My email address is  rmtes...@pn.itnet.it

                                   Gianluca Giraldi

 

Re:BDE SQL Is Case Sensitive Only ?


Quote
In article <4art1l$...@alpha.it.net> Roberto  <rmtes...@pn.itnet.it> writes:
>If I type
>   SELECT * FROM Employees WHERE FirstName LIKE 'Smith'
>with a Tquery component the BDE retrieve only the'Smith'
>FirstNames of an Employees list.
>What should I type for obtain:
>smith
>Smithson
>Smith

Try
SELECT * FROM Employees WHERE UPPER(FirstName) LIKE 'SMITH%'

Quote
>Tanks to all.

Hope it works

Quote
>...
>                                   Gianluca Giraldi

Guido Bertsche (berts...@quantum.de)

Re:BDE SQL Is Case Sensitive Only ?


Hi,

Your SQL syntax is wrong. To get the data that you want you need to
use the % wild card. Such as:

   SELECT * FROM Employees WHERE FirstName LIKE 'Smith%'

That will get you the Smithson as well as Smith entries.

Case sensitivity is determined by your database (not BDE). Check your
database documentation on how to turn it off if you need to.

Hope this helps,
Allen

Quote
Roberto  <rmtes...@pn.itnet.it> wrote:
>If I type
>   SELECT * FROM Employees WHERE FirstName LIKE 'Smith'
>with a Tquery component the BDE retrieve only the'Smith'
>FirstNames of an Employees list.
>What should I type for obtain:
>smith
>Smithson
>Smith
>Tanks to all.
>My email address is  rmtes...@pn.itnet.it

>                                   Gianluca Giraldi

Re:BDE SQL Is Case Sensitive Only ?


Hi!

I need to know/set the active record number in my database application.
I have used the Object Browser to check the TDataLink components, and
they seem to have a property named ActiveRecord. How can I access the
property? Or do I have make direct calls to the BDE to get/set the
active record?

Regards,

Jani Jarvinen
jani.jrvi...@hitec.fipnet.fi

---
Check out Help Editor 2.0 for Windows, the most powerful program to
create Windows Help files:
ftp://ftp.mpoli.fi/metropoli/windows/utils/hlped20.zip
---
 * SLMR 2.1a *

Re:BDE SQL Is Case Sensitive Only ?


Hi!

Crystal Reports Pro 4.5 is advertised to include Delphi support. Has
anybody used CRP succesfully with Delphi apps to create reports? How
good is the Report component?

Regards,

Jani Jarvinen
jani.jrvi...@hitec.fipnet.fi

---
Check out Help Editor 2.0 for Windows, the most powerful program to
create Windows Help files:
ftp://ftp.mpoli.fi/metropoli/windows/utils/hlped20.zip
---
 * SLMR 2.1a *

Re:BDE SQL Is Case Sensitive Only ?


Hi!

This is a newbie question, but anyway: I create a Paradox table in my
app with the CreateTable call. In the table, I have have a number field,
which has to contain same values for different records (ie. non-unique
field). I have understood that if there are similar values in many
records, I cannot have an index. Still, I have to search for values
based on the number field, and possibly others. Is my only solution to
iterate through the entire table with Next and find the records I need
by hand? The SetKey/GotoKey and FindKey functions simply do not work.
Also, I have tried the IndexFieldNames and the IndexName properties
without success.

Regards,

Jani Jarvinen
jani.jrvi...@hitec.fipnet.fi

---
Check out Help Editor 2.0 for Windows, the most powerful program to
create Windows Help files:
ftp://ftp.mpoli.fi/metropoli/windows/utils/hlped20.zip
---
 * SLMR 2.1a *

Re:BDE SQL Is Case Sensitive Only ?


In article <8B7B409.0BE2001A4B.uu...@hitec.fipnet.fi> jani.jrvi...@hitec.fipnet.fi (JANI JRVINEN) writes:

Quote
>Crystal Reports Pro 4.5 is advertised to include Delphi support. Has
>anybody used CRP succesfully with Delphi apps to create reports? How
>good is the Report component?

It works ... the documentation is very sparse but it does work well enough
once you get the hang of it.  Problem I'm having is that there's a GDI memory
leak somewhere.

Re:BDE SQL Is Case Sensitive Only ?


Hi Jani

Could you not have a unique autoincrement field which is keyed, along
with a other fields that you need to search on (also keyed) this will
still give you your non-unique fields, along with the unique
autoincrement field - and therefore not causing key violations.

Try using SetKey and GotoNearest instead of gotokey.

Or try using SQL query to create an in memory table of results. In the
SQL statement you can use something like Select * form (your table)
where (SQL paramater) Like "%(search value)%" This has the advantage
of doing a Like search and not an exact match. SetKey to the value of
the first record of the in memory table then Findnearest on your
table. You can then move to the next record of the in memory table and
set key, findnearest etc... This is also nice since you will know how
many matches there are (no of records in the in memory table).

Failing that you could use a search engine such as DBLocate - by
Datacraft (mic...@datacraft.db.com) since this will do all of this for
you, and more.

Hope this helps in some way

James

Re:BDE SQL Is Case Sensitive Only ?


Die Engel schwiegen verschaemt, als jani.jrvinen anhub, um zum Thema
"Re: Searching without index" am 27.12.95 zu proklamieren:

Quote
> field). I have understood that if there are similar values in many
> records, I cannot have an index. Still, I have to search for values

That is not true. It _is_ possible to have an index on non-unique fields.
And this should be the solution to your problems.

Gruss, Thomas
--
Hau ab, sie haben alles entdeckt!

Re:BDE SQL Is Case Sensitive Only ?


There's no easy answer to that one.  I use Apollo 2.0 which includes a
component to determine Recno().  Unless you want to get into grass-roots
component creating, you don't have a lot of options.

Re:BDE SQL Is Case Sensitive Only ?


In article <8B7B409.0BE2001A4C.uu...@hitec.fipnet.fi>
           jani.jrvi...@hitec.fipnet.fi "JANI JRVINEN" writes:

Quote
>This is a newbie question, but anyway: I create a Paradox table in my
>app with the CreateTable call. In the table, I have have a number field,
>which has to contain same values for different records (ie. non-unique
>field). I have understood that if there are similar values in many
>records, I cannot have an index. Still, I have to search for values
>based on the number field, and possibly others. Is my only solution to
>iterate through the entire table with Next and find the records I need
>by hand? The SetKey/GotoKey and FindKey functions simply do not work.
>Also, I have tried the IndexFieldNames and the IndexName properties
>without success.

In Paradox a primary key field must be unique and a secondary index
can only be created on a table with a primary key. So you need to
find a way of creating a primary even if you have to create an
extra field to add it.

--
Donald Oddy
Grove Systems Ltd.                                    0161-224 4465

Other Threads