Paradox Community

Items in pnews.paradox-programming

Subject:Re: Query using Alpha field with Numbers
Date:Sat, 3 Sep 2022 22:11:44 +1000
From:Leslie <"ViaThe List"@NOSPAM.com>
Newsgroups:pnews.paradox-programming
I might add that you can remove leading Zeros using TRIM() in LocalSQL. 
Not that it matters when casting to a numeric.

On 3/09/2022 8:58 PM, Leslie wrote:
> Assuming that the goal is to either compare against previous versions of
> the product where the format of past versions should be known
>
> OR
>
> the scenario where the version number format is documented,
>
> then in that case you would also use the SUBSTRING operator in
> combination with the Cast operator to do the comparison.
>
>
> On 3/09/2022 6:59 AM, Kevin Zawicki wrote:
>> That works unless you start to use sub sub versions 21.1.1,etc
>>
>>
>> Also having these as alpha will not sort them (maybe) the way you want
>> (if
>> you care). You would be sorting numbers alphabetically.
>>
>> 1
>> 10
>> 100
>>
>> etc
>>
>>
>> You could use a tcursor and parse these into a temp table or array and
>> cast
>> as numbers
>>
>> or
>> break on    .  and get two parts (or more if sub sub version)
>>
>>
>> leading zeroes can also come into play
>>
>>
>>
>> Leslie <"ViaThe List"@NOSPAM.com> wrote:
>>> Use Local SQL and the Cast operator
>>>
>>> On 1/09/2022 6:27 PM, Kevin wrote:
>>>> I have a db with a "Version" field.  This field is a Alpha field.  Is
>> it possible
>>>> to build a query with criteria for version > 20
>>>>
>>>
>>> --
>>> This email has been checked for viruses by Avast antivirus software.
>>> www.avast.com
>>
>

-- 
This email has been checked for viruses by Avast antivirus software.
www.avast.com


Copyright © 2004 thedbcommunity.com