W
Webtechie
Hello,
I have a table myTable that needs to be updated.
mytable
id name payment savings checking credit card
1 John Doe DB x
When there is a value in the savings or checking field, then I need to put
"DB" in the payment field.
However,
When there is a value in the credit card field, then I need to put "CD" in
the payment field.
I am thinking I need to do:
select id, name, payment =
case
when len(savings) = 0 then "DB"
when len(chekcing) > 0 then "DB"
when len(creditcard) > 0 then "CD"
end Case
from myTemp.
At least that is what I would do in SQL Server. How do I do this in Access?
I am doing this via VBA which is why I posted to the programming forum. I
would run
docmd.runSQL strSQL
Thanks.
Tony
I have a table myTable that needs to be updated.
mytable
id name payment savings checking credit card
1 John Doe DB x
When there is a value in the savings or checking field, then I need to put
"DB" in the payment field.
However,
When there is a value in the credit card field, then I need to put "CD" in
the payment field.
I am thinking I need to do:
select id, name, payment =
case
when len(savings) = 0 then "DB"
when len(chekcing) > 0 then "DB"
when len(creditcard) > 0 then "CD"
end Case
from myTemp.
At least that is what I would do in SQL Server. How do I do this in Access?
I am doing this via VBA which is why I posted to the programming forum. I
would run
docmd.runSQL strSQL
Thanks.
Tony