欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

C#检索access数据库时如何将文本字段转换成数字

程序员文章站 2024-01-19 20:02:58
...

可以参考以下例子,table1.a为字符串,table2.b为数值 select a from Table1 where val(a) in (select b from Table2) or select a from Table1 where a in (select str(b) from Table2) or select a from Table1 where a in (select cstr(b) from Table2) o

可以参考以下例子,table1.a为字符串,table2.b为数值

select a from Table1 where val(a) in (select b from Table2)
or
select a from Table1 where a in (select str(b) from Table2)
or
select a from Table1 where a in (select cstr(b) from Table2)
or
select a from Table1 where a in (select format(b,'#####') from Table2)