Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top