Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Ambsgirl

    List Constraints For A Column

    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...
  2. Ambsgirl

    List Constraints For A Column

    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. :)
  3. Ambsgirl

    List Constraints For A Column

    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.
  4. Ambsgirl

    List Constraints For A Column

    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...
  5. Ambsgirl

    List Constraints For A Column

    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...
  6. Ambsgirl

    List Constraints For A Column

    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...
  7. Ambsgirl

    List Constraints For A Column

    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...
  8. Ambsgirl

    Convert From Varchar to Uniqueidentifier in Update Table Statement

    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...
  9. Ambsgirl

    Convert From Varchar to Uniqueidentifier in Update Table Statement

    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...
  10. Ambsgirl

    Convert From Varchar to Uniqueidentifier in Update Table Statement

    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...
  11. Ambsgirl

    Identifying a Constraint vs. Index using the SqlDmo Object

    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...
  12. Ambsgirl

    Alter Column to be an Identity

    Huh... that is so not the answer I was hoping for! But thanks for clearing that up for me. At least now I can move on and resign myself to extra code.
  13. Ambsgirl

    Alter Column to be an Identity

    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)...

Part and Inventory Search

Back
Top