Winforms 从winform应用程序中绑定源代码管理中的字母数字字段中获取筛选的数字数据
我有一个绑定源代码控件,它绑定到一个名为Customer的表。此表中有一列名为“CustomerNo”,其中包含字母数字数据。我想对绑定源应用一个过滤器,它只显示在“CustomerNo”中只有数值的行,并且值必须在13到20之间 例如,如果CustomerNo列中有以下数据Winforms 从winform应用程序中绑定源代码管理中的字母数字字段中获取筛选的数字数据,winforms,visual-studio-2010,sql-server-2008-r2,Winforms,Visual Studio 2010,Sql Server 2008 R2,我有一个绑定源代码控件,它绑定到一个名为Customer的表。此表中有一列名为“CustomerNo”,其中包含字母数字数据。我想对绑定源应用一个过滤器,它只显示在“CustomerNo”中只有数值的行,并且值必须在13到20之间 例如,如果CustomerNo列中有以下数据 10 11 12 13 14 as55 as66 as77 15 所以它应该给我以下结果。(因为我的过滤范围是13-20,我只需要数值) 我只想对字母数字列的数值应用过滤器 请帮我解决我的问题 select Custom
10
11
12
13
14
as55
as66
as77
15
所以它应该给我以下结果。(因为我的过滤范围是13-20,我只需要数值)
我只想对字母数字列的数值应用过滤器
请帮我解决我的问题
select CustomerNo from (
select CustomerNo from customers
where ISNUMERIC(CustomerNo )=1 ) c
where c.CustomerNo between 13 and 20
使用此查询或创建视图并使用它我希望它能帮助您或其他人
select CustomerNo from (
select CustomerNo from customers
where ISNUMERIC(CustomerNo )=1 ) c
where c.CustomerNo between 13 and 20