Case sensitive WHERE in Access 2010

我只是一个虾纸丫 提交于 2019-12-01 17:34:18

问题


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.

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.

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'

that only affects the rows with [PKFIELD]='Au' and not the rows with [PKFIELD]='AU'

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


回答1:


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


来源:https://stackoverflow.com/questions/4745648/case-sensitive-where-in-access-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!