Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is the Syntax Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01287604
Message ID:
01287610
Vues:
23
>Hi
>
>I have been testing the Alter Table Command and it worked fine when I tried to create a candidate index tag but fails when I try to create a Foreign Key tag.
>
>I get a syntax error with following:
>
>Alter Table UPSystem Add Foreign Key Upper(Module+Name) Tag Name
>
>Where is the syntax error?
>
>If I change the command to:
>
>Alter Table UPSystem Add Unique Upper(Module+Name) Tag Name
>
>it works just fine.
>
>Regards,
>Simon

The whole command for FKs is:
ADD FOREIGN KEY [eExpression5] [FOR lExpression6] TAG TagName4
      REFERENCES TableName4 [TAG TagName4][COLLATE cCollateSequence]
      REFERENCES TableName2 [TAG TagName5]
So your command should be:
Alter Table UPSystem Add Foreign Key Upper(Module+Name) Tag Name;
      REFERENCES SomeOtherTable [TAG SomeTag]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform