Subject: | Local SQL Where Cause
| Date: | Wed, 22 Jul 2020 05:32:11 -0400
| From: | Kevin Baker <shcsbaker@gmail.com>
| Newsgroups: | pnews.paradox-programming
|
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?
|