Paradox Community

Items in pnews.paradox-programming

Subject:Re: Local SQL Where Cause
Date:Wed, 22 Jul 2020 05:52:27 -0400
From:Kevin Baker <shcsbaker@gmail.com>
Newsgroups:pnews.paradox-programming
an example of the number in field is: 2,020.07

On 7/22/2020 5:32 AM, Kevin Baker wrote:
> I've got a number field in a DB and I'm trying to use that field  in the 
> WHERE cause of a SQL statement.
> 
> The value will be selected by the user, so I store their selected value 
> in a form var called RecD using the number as type.
> 
> Try #1 = Type mismatch in expression
> SELECT
>      ck."ckDate", ck.Num, ck.tranType, ck.Payee, ck.payment, ck.deposit, 
> ck.Bud2YrMo
> FROM Checks ck
> WHERE (ck.Bud2YrMo = '~RecD')
> GROUP By ck."ckDate", ck.Num, ck.tranType, ck.Payee, ck.payment, 
> ck.deposit, ck.Bud2YrMo
> 
> 
> Try #2 = Type mismatch in expression
> WHERE (ck.Bud2YrMo = CAST('~RecD' as CHAR))
> 
> Try #3 = Type mismatch in expression
> rc = string(RecD)
> 
> WHERE (ck.Bud2YrMo = '~rc')
> 
> How do I use a numeric value in the WHERE clause?


Copyright © 2004 thedbcommunity.com