>I've got a table with a bunch of addresses in them. Unfortunately, whoever created the table left the state field sort of free form and didn't do any validation. Entries for New York range include NY, Ny, N.Y. New York, etc.
>
>I've went postal (sorry, couldn't resist) and added a POSTAL field at the end of the table. To populate this field I tried
>
>
>SELECT DIST state,postal FROM myTable INTO CURSOR curTemp
>USE DBF() AGAIN IN 0 ALIAS curPostal
>USE
>SELECT curPostal
>
>.....Manually adjust the Postal field to proper values
>
>UPDATE myTable;
> SET postal=(SELECT postal.postal FROM curPostal WHERE myTable.state = curPostal.state)
>
Obvious typo in the above command: select postal from curPostal where ..., IOW, don't need postal.postal
You can also just establish relation between myTable and curPostal and do replace...
>
>
>This generates an error message
>
>
<B>Function Name is Missing )</B>
>
>which is confusing the heck out of me.
>
>I know that I can use REPLACE with a SET RELATION in effect, but I'd like to know the proper syntax using SQL.
>
>Thanks to all.......Rich
If it's not broken, fix it until it is.
My Blog