Unfortunately, that query does not show primary or foreign keys which is why you have to use sp_pkeys and sp_fkeys for that info. But it does seem to give you all other constraint info.
I do not doubt that you did what you thought was most helpful and I do appreciate your intent if not your...
N2Code, I've also discovered that and now that I know you are using it as well, I feel more confident in trusting it. Thanks a million for your help and your quick response. :)
Esquared, that is definitely more than I bargained for. I see why it took you hours to put that together. I'll play around with it and see what happens. Thanks for your help and your time.
I wasn't aware that the usefulness of the answer directly coincides with the amount of hours I had already invested in the problem. If I were, I would have told you that I rolled up my sleeves hours ago. I'm certainly not looking to encroach on anyone's hours of hard work who is unwilling. I...
Thanks for the advice, Esquared. While I appreciate your interest in my ability to solve my own problems, I was under the impression that these forums exist for the purpose of allowing people to help each other. sp_helpconstraint was something I already knew about as I stated in my original...
Actually, that doesn't tell me quite what I want to know. It returns all constraints for all columns in the table which would be great if it had a separate column saying the column the constraint is on, but it doesn't. It gives a description with the column name but that varies depending on...
How do I list all the constriants that exist on one column? sp_helpconstraint will list all constraints for the table as does select * from sysobjects where objectproperty(id,N'IsConstraint')=1 and
parent_obj=coalesce(object_id('di_menus'),'-1').
I'm trying to delete a column programmatically...
Here are the the top 5 values I'm getting from my table from the old rowguid:
{DDA3091E-9833-40F5-AFB8-57C540C85FA}
{2DB57701-D310-4B21-A9AA-5F7AFD99D85}
{0D982009-0E4A-4B7C-99C2-B7E45B876E9}
{8A5B9B01-B866-4DCF-AE93-00BAC0BA4CD}
{EF84594A-E22F-43B6-9E51-0EF24F09B58}
But you're definitely right...
I get the concept of a uniqueidentifier. I have a program that our customers use to upgrade their databases. It generates scripts of our "master" database which we send to our customer. The program compares those scripts to their database and makes the necessary changes. For columns that...
I need to alter a varchar column to be a uniqueidentifier in code so I've created a temporary column that is a uniqueidentifier and need to copy the values from the old column to my temporary column. Only this generates an error that it cannot convert a varchar into a uniqueidentifier...
I have a program that tries to alter various columns which means of course, I have to drop indexes and/or constraints on that column. I was looping through the indexes on the table and doing it that way but many of those indexes in that collection are constraints and I was getting an error...
I'm trying to programmatically alter a column as an identity. I can change it successfully through Enterprise Manager so I'd imagine there must be a way to actually write a script to do it, isn't there? This does not work: ALTER TABLE DI_BATCHES alter column DB_BATCH_ID int IDENTITY (1, 1)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.