Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UPDATE - SQL
Message
De
21/02/2001 11:08:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
UPDATE - SQL
Divers
Thread ID:
00478001
Message ID:
00478001
Vues:
46
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)
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform