Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Case-insensitive Distinct query?
Wed, Jan 4 2006 7:11 PMPermanent Link

"Allan Roberts"

Is there a way to perform a case-insensitive distinct query?   The statement
"Select Distinct Upper(ProdType) from Parts" generates an error.  Is there
another way to cast this?  Thanks.


Wed, Jan 4 2006 10:39 PMPermanent Link

"Clive"
Just tried that myself in V4.22 B1 and works fine using upper.

"Allan Roberts" <aroberts@roboticstech.com> wrote in message
news:C8447909-91B4-49E7-BA29-F186DBE1DF7C@news.elevatesoft.com...
>
> Is there a way to perform a case-insensitive distinct query?   The
> statement
> "Select Distinct Upper(ProdType) from Parts" generates an error.  Is there
> another way to cast this?  Thanks.
>
>
>

Wed, Jan 4 2006 10:45 PMPermanent Link

"Clive"
Is the SQL you posted all the SQL or where you also putting an order by
clause in?..

ie
Select Distinct Upper(ProdType) from Parts order by Upper(ProdType)

Because that will generate an error ,try this instead if thats the case

Select Distinct Upper(ProdType) as mycol from Parts order by mycol


"Clive" <dd@dddd.com> wrote in message
news:A0856635-0CDB-4080-A620-6B97268BA789@news.elevatesoft.com...
> Just tried that myself in V4.22 B1 and works fine using upper.
>
> "Allan Roberts" <aroberts@roboticstech.com> wrote in message
> news:C8447909-91B4-49E7-BA29-F186DBE1DF7C@news.elevatesoft.com...
>>
>> Is there a way to perform a case-insensitive distinct query?   The
>> statement
>> "Select Distinct Upper(ProdType) from Parts" generates an error.  Is
>> there
>> another way to cast this?  Thanks.
>>
>>
>>
>
>

Thu, Jan 5 2006 12:02 PMPermanent Link

"Allan Roberts"

"Clive" <dd@dddd.com> wrote in message
news:7CC04CA8-D782-4F6E-B09B-AC1D66F59FEF@news.elevatesoft.com...
> Is the SQL you posted all the SQL or where you also putting an order by
> clause in?..
>
> ie
> Select Distinct Upper(ProdType) from Parts order by Upper(ProdType)
>
> Because that will generate an error ,try this instead if thats the case
>
> Select Distinct Upper(ProdType) as mycol from Parts order by mycol


Thanks, that fixed it!

Image