Any Idea to do it ?

Results 1 to 15 of 15
  1. #1
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Any Idea to do it ?

    when i add new code in any table
    the code place in first rows
    i need this code be in last page
    sorry about my English

    Exp
    Attached Thumbnails Attached Thumbnails untitled.jpg  


  2. #2
    Elite Member IMOS is offline
    Member +Rank
    Dec 2007 Join Date
    125Posts

    Re: Any Idea to do it ?

    I'm not 100% on this but this may be happening because there may be existing duplicate values on that column. SQL Server Management gets confused and then just throws up new stuff at the top, either this or nothing wrong with it being placed at the top.

    You can run a query to see if there are any values that are repeated:

    Code:
    --Finds duplicate data in a certain table row.
    --imos
     
    USE [SRO_VT_SHARD]
    GO
    SELECT ID, COUNT(ID) AS NumOccurrences
    FROM _RefObjCommon --table name
    GROUP BY ID
    HAVING ( COUNT(ID) > 1 )
    or if you want to arrange them from least to greatest or A-Z:

    Code:
    --imos: will sort any column from values 0-999.. or a-z
    --ASC for numbers DESC for letters
    USE SRO_VT_SHARD
    GO
    SELECT *
    FROM _RefObjCommon --table name
    ORDER BY ID ASC --column name and sort type
    Hope it helps.

  3. #3
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Any Idea to do it ?

    thx bro for try help me :)
    i will try to find any thing to do it from option

  4. #4
    Grand Master Statiic is offline
    Grand MasterRank
    Nov 2011 Join Date
    BrazilLocation
    611Posts

    Re: Any Idea to do it ?

    _RefObjCommon > Design > right click ID Column Set a primary key > Column Properties > Indetity Spercification > (Is Indetity) set "Yes" done. same with others tables like _RefObjChar And _RefObjItem

    when u use a db created in mssql 2008 r2 and the owner convert to sql 2005 primary key and indexes is removed automatic

  5. #5
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Any Idea to do it ?

    i use 2008 r2 bro but i will try this way

    Edit: Ur way work fine with me on SQLServer 2008 R2
    Ty My Teacher
    Last edited by Kira; 18-04-12 at 02:01 AM.

  6. #6
    Sorcerer Supreme arabianfox is offline
    Member +Rank
    Nov 2011 Join Date
    292Posts

    Re: Any Idea to do it ?

    Quote Originally Posted by Statiic View Post
    _RefObjCommon > Design > right click ID Column Set a primary key > Column Properties > Indetity Spercification > (Is Indetity) set "Yes" done. same with others tables like _RefObjChar And _RefObjItem

    when u use a db created in mssql 2008 r2 and the owner convert to sql 2005 primary key and indexes is removed automatic


    Then ?!!!

  7. #7
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Any Idea to do it ?

    Quote Originally Posted by arabianfox View Post


    Then ?!!!
    Save and close ur table and open it again
    and will work with u
    don't forget to give Like to my Teacher Statiic

  8. #8
    Sorcerer Supreme arabianfox is offline
    Member +Rank
    Nov 2011 Join Date
    292Posts

    Re: Any Idea to do it ?

    Save what?? "save text file" ?!

    didn't work here with me

  9. #9
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Any Idea to do it ?

    Save the change on table first
    and wait statiic he will answer
    maybe i am wrong
    but it work with me one SqlServer 2008 R2

  10. #10
    Grand Master Statiic is offline
    Grand MasterRank
    Nov 2011 Join Date
    BrazilLocation
    611Posts

    Re: Any Idea to do it ?

    Quote Originally Posted by arabianfox View Post


    Then ?!!!
    go Tools > Options... > Designers > and Clean "Prevent saving changes that require table re-creation" done! ^^

  11. #11
    Sorcerer Supreme arabianfox is offline
    Member +Rank
    Nov 2011 Join Date
    292Posts

    Re: Any Idea to do it ?

    now i must "like" and say thanks,works great here.

  12. #12
    ✗ ¤ Kira ¤ ✗ Kira is offline
    Grand MasterRank
    Nov 2011 Join Date
    ✗¤EGYPT¤✗Location
    578Posts

    Re: Any Idea to do it ?

    Quote Originally Posted by arabianfox View Post
    now i must "like" and say thanks,works great here.
    i told you he will answer
    luv my teacher

  13. #13
    Sorcerer Supreme arabianfox is offline
    Member +Rank
    Nov 2011 Join Date
    292Posts

    Re: Any Idea to do it ?

    many thanks Statiic and another question is this method also for tables (Refpackageitem - Refscrapofpackageitem)

    Coz they has the same problem at ID and index columns

    and many thanks for your help..

  14. #14
    Grand Master RevoLand is offline
    Member +Rank
    Jan 2009 Join Date
    117Posts

    Re: Any Idea to do it ?

    i late to reply?

    ----
    i get a new idea from this thread, we know how to make auto increement the column or whatever
    so if we try it in RefObjCommon or like this tables to dont get error while adding avatars & etc can we success?
    Last edited by RevoLand; 18-04-12 at 02:53 AM.

  15. #15
    Grand Master Statiic is offline
    Grand MasterRank
    Nov 2011 Join Date
    BrazilLocation
    611Posts

    Re: Any Idea to do it ?

    Quote Originally Posted by arabianfox View Post
    many thanks Statiic and another question is this method also for tables (Refpackageitem - Refscrapofpackageitem)

    Coz they has the same problem at ID and index columns

    and many thanks for your help..
    yes but Refscrapofpackageitem do this process in the last column "[Index]"



Advertisement