Access 2010中区分大小写的WHERE [英] Case sensitive WHERE in Access 2010

查看:67
本文介绍了Access 2010中区分大小写的WHERE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须将数据从悖论数据库导入到新创建的WPF/SQL-Server应用程序中.我已经成功地将必要的悖论数据导入到Access中,现在正在编写一个实用程序来转换数据并将其导入到SQL Server中.

I have to import data from a paradox database into a newly created WPF / SQL-Server application. I have sucessfully imported the necessary paradox-data into Access and now are writing a utility that converts the the data and imports it into SQL Server.

现在我有一个问题,即悖论主键似乎区分大小写.这导致我有一个主键为"Au"的记录和其他主键为"AU"的记录的问题,它们是不一样的.

Now I have the problem that the paradox primary-keys seem to be case sensitive. This leads to the proplem that I have records with a Primary Key "Au" and other recors with the primary Key "AU" and they are not the same.

现在我正在搜索是否可以在Access中编写更新脚本<​​/strong>,以便可以编写

Now I search for a possibility to write Update scripts in Access so that I can write

UPDATE [TABLE_NAME] SET [PKFIELD]="Au1" WHERE [PKFIELD]='Au'

仅影响[PKFIELD] ='Au'的行,而不影响[PKFIELD] ='AU'的行

是否有可以用于此目的的功能或如何实现此功能.

Is there a function I can use for this or how can I achieve this.

推荐答案

好的,我询问SO有点快.我自己找到了答案:

Ok, I was a little bit fast in asking SO. I have found the answer myself:

UPDATE [TABLE_NAME] SET [PKFIELD]="Au1" WHERE StrComp([PKFIELD],'Au', 0) = 0

这篇关于Access 2010中区分大小写的WHERE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆