Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 SQL Questions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01270796
Message ID:
01270915
Vues:
23
Looks fine.

>The reason I wanted this was because I wrote a routine that SCANs through a table, and if
>a record was appended, it forms an INSERT command & runs it. Problem is, unless
>IDENTITY_INSERT is ON, then an error reults. The above code would allow me to exclude the PK
>column from the INSERT command.
>
>However, the PK column isn't necessarily the same columnd as the Identity column. So, long
>story short - what I really needed was a way to determine the Identity column. I came up
>with this:
>
>
>SELECT Name AS Identity_Column
>  FROM sys.identity_columns
>  WHERE Object_Id = object_id(@Table_Name)
>
>
>See any reason why this would not work?
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform