How to do a case sensitive query to an OE10 db that is case insensitive

ClayGoss

Member
I wish to do an ODBC SQL query of an OE10 DB that was setup as case insensitive in a case sensitive fashion. Specificly, I would like to get a distinct list of the values in a field in a table showing all case versions of a given value like:

THE
The
the

...instead of just:

THE

Thanks.
 

Casper

ProgressTalk.com Moderator
Staff member
I'm not sure, but my guess is that if the field isn't defined as case-sensitive this will not work with SQL.

Casper.
 

Casper

ProgressTalk.com Moderator
Staff member
Maybe this gives you an idea:

Code:
define variable iTel as integer no-undo.
define variable cValue as character no-undo.
assign cValue = 'the,the,The,The,THe,THe,THE,THE'.
define  temp-table ttcase no-undo
    field ctValue as character case-sensitive
    index iIdx is primary ctvalue.
do  iTel = 1 to 8:
    create ttcase.
    assign ttcase.ctvalue = entry(iTel,cvalue).
    release ttCase.
end.
for each ttCase break by ctValue:
    if first-of(ttcase.ctvalue)
    then display ttcase.ctvalue.
end.

Casper.
 

tamhas

ProgressTalk.com Sponsor
I.e., if you want it to be case-sensitive, you either need to change the field containing the data or copy the data to a place that is case-sensitive.
 
Top