Reset Column Header IndexExporting from SQL Server 2005 for import into ER Studio 9.0Why does Management Studio not automatically create FK column in the parent table?Header and line item data source mismatchIndex will be removedChanging an nvarchar column to datetimeCode required to make column not nullableColumn Name in separate table SQL ServerTwo SQL Server databases share the same MDF and LDF files but have different datajoin two tables, include one row from the parent table for each primary keySQL don't display ORDER BY column

Do I care if the housing market has gone up or down, if I'm moving from one house to another?

Can a creature sustain itself by eating its own severed body parts?

What is the best word describing the nature of expiring in a short amount of time, connoting "losing public attention"?

What are "the high ends of castles" called?

Killing a star safely

Is there an English word to describe when a sound "protrudes"?

Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?

What kind of vegetable has pink and white concentric rings?

Why Lie algebras if what we care about in physics are groups?

Is it ethical to tell my teaching assistant that I like him?

1025th term of the given sequence.

is FIND WORDS in P?

Reissue US, UK, Canada visas in stolen passports

Plotting maxima within a simplex

Why do we need an estimator to be consistent?

Book in which the "mountain" in the distance was a hole in the flat world

Can the caster of Time Stop still use their bonus action or reaction?

What does a Nintendo Game Boy do when turned on without a game cartridge inserted?

Found old paper shares of Motorola Inc that has since been broken up

Can I make Ubuntu 18.04 switch between multiple windows of the program by just clicking the icon?

Count the identical pairs in two lists

Found more old paper shares from broken up companies

Function pointer parameter without asterisk

Is it better to deliver many low-value stories or few high-value stories?



Reset Column Header Index


Exporting from SQL Server 2005 for import into ER Studio 9.0Why does Management Studio not automatically create FK column in the parent table?Header and line item data source mismatchIndex will be removedChanging an nvarchar column to datetimeCode required to make column not nullableColumn Name in separate table SQL ServerTwo SQL Server databases share the same MDF and LDF files but have different datajoin two tables, include one row from the parent table for each primary keySQL don't display ORDER BY column






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I uploaded some tables to SQL Server Management Studio. Upon inspecting the tables I've found that the column headers area actually values. Is there any way to bump the headers down into a new row and to create new column headers, or will I have to re-upload all of the tables and remember to select the 'has header' option?



Thanks.










share|improve this question







New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1





    from what source you uploaded the tables? Excel or CSV?

    – Rajesh Ranjan
    9 hours ago











  • Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

    – CharlesD
    8 hours ago

















4















I uploaded some tables to SQL Server Management Studio. Upon inspecting the tables I've found that the column headers area actually values. Is there any way to bump the headers down into a new row and to create new column headers, or will I have to re-upload all of the tables and remember to select the 'has header' option?



Thanks.










share|improve this question







New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1





    from what source you uploaded the tables? Excel or CSV?

    – Rajesh Ranjan
    9 hours ago











  • Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

    – CharlesD
    8 hours ago













4












4








4








I uploaded some tables to SQL Server Management Studio. Upon inspecting the tables I've found that the column headers area actually values. Is there any way to bump the headers down into a new row and to create new column headers, or will I have to re-upload all of the tables and remember to select the 'has header' option?



Thanks.










share|improve this question







New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I uploaded some tables to SQL Server Management Studio. Upon inspecting the tables I've found that the column headers area actually values. Is there any way to bump the headers down into a new row and to create new column headers, or will I have to re-upload all of the tables and remember to select the 'has header' option?



Thanks.







sql-server






share|improve this question







New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









CharlesDCharlesD

233 bronze badges




233 bronze badges




New contributor



CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




CharlesD is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









  • 1





    from what source you uploaded the tables? Excel or CSV?

    – Rajesh Ranjan
    9 hours ago











  • Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

    – CharlesD
    8 hours ago












  • 1





    from what source you uploaded the tables? Excel or CSV?

    – Rajesh Ranjan
    9 hours ago











  • Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

    – CharlesD
    8 hours ago







1




1





from what source you uploaded the tables? Excel or CSV?

– Rajesh Ranjan
9 hours ago





from what source you uploaded the tables? Excel or CSV?

– Rajesh Ranjan
9 hours ago













Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

– CharlesD
8 hours ago





Sorry, I should have mentioned that. Excel, it was one sheet with several tabs.

– CharlesD
8 hours ago










2 Answers
2






active

oldest

votes


















4














Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one.



Example:



CREATE TABLE dbo.wrongo(wrong INT, [column] INT, names INT);
CREATE TABLE dbo.righto(correct INT, [column] INT, names INT);

INSERT dbo.righto ( correct, [column], names )
SELECT wrong, [column], names
FROM dbo.wrongo
WHERE wrongo.wrong <> 'column name'; --this will throw an error, but you get the idea.

DROP TABLE dbo.wrongo;

EXEC sp_rename 'dbo.righto', 'wrongo', 'OBJECT';





share|improve this answer






























    0














    There are two ways you can avoid having values as columns name while loading data from excel source.



    1. Create the table in the database using the CREATE TABLE statement and then upload data using DTS.

    2. Mention column names as the first record in the excel sheet and upload it.

    There are other ways too, but these are easier steps.



    Thanks!






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "182"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      CharlesD is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f243468%2freset-column-header-index%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one.



      Example:



      CREATE TABLE dbo.wrongo(wrong INT, [column] INT, names INT);
      CREATE TABLE dbo.righto(correct INT, [column] INT, names INT);

      INSERT dbo.righto ( correct, [column], names )
      SELECT wrong, [column], names
      FROM dbo.wrongo
      WHERE wrongo.wrong <> 'column name'; --this will throw an error, but you get the idea.

      DROP TABLE dbo.wrongo;

      EXEC sp_rename 'dbo.righto', 'wrongo', 'OBJECT';





      share|improve this answer



























        4














        Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one.



        Example:



        CREATE TABLE dbo.wrongo(wrong INT, [column] INT, names INT);
        CREATE TABLE dbo.righto(correct INT, [column] INT, names INT);

        INSERT dbo.righto ( correct, [column], names )
        SELECT wrong, [column], names
        FROM dbo.wrongo
        WHERE wrongo.wrong <> 'column name'; --this will throw an error, but you get the idea.

        DROP TABLE dbo.wrongo;

        EXEC sp_rename 'dbo.righto', 'wrongo', 'OBJECT';





        share|improve this answer

























          4












          4








          4







          Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one.



          Example:



          CREATE TABLE dbo.wrongo(wrong INT, [column] INT, names INT);
          CREATE TABLE dbo.righto(correct INT, [column] INT, names INT);

          INSERT dbo.righto ( correct, [column], names )
          SELECT wrong, [column], names
          FROM dbo.wrongo
          WHERE wrongo.wrong <> 'column name'; --this will throw an error, but you get the idea.

          DROP TABLE dbo.wrongo;

          EXEC sp_rename 'dbo.righto', 'wrongo', 'OBJECT';





          share|improve this answer













          Probably the least complicated option would be to select all your data into a new table with the correct column names, filtering out the row of values containing the header values. From there, you can drop the malformed table, and rename the new one.



          Example:



          CREATE TABLE dbo.wrongo(wrong INT, [column] INT, names INT);
          CREATE TABLE dbo.righto(correct INT, [column] INT, names INT);

          INSERT dbo.righto ( correct, [column], names )
          SELECT wrong, [column], names
          FROM dbo.wrongo
          WHERE wrongo.wrong <> 'column name'; --this will throw an error, but you get the idea.

          DROP TABLE dbo.wrongo;

          EXEC sp_rename 'dbo.righto', 'wrongo', 'OBJECT';






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          Erik DarlingErik Darling

          25.9k13 gold badges79 silver badges128 bronze badges




          25.9k13 gold badges79 silver badges128 bronze badges























              0














              There are two ways you can avoid having values as columns name while loading data from excel source.



              1. Create the table in the database using the CREATE TABLE statement and then upload data using DTS.

              2. Mention column names as the first record in the excel sheet and upload it.

              There are other ways too, but these are easier steps.



              Thanks!






              share|improve this answer



























                0














                There are two ways you can avoid having values as columns name while loading data from excel source.



                1. Create the table in the database using the CREATE TABLE statement and then upload data using DTS.

                2. Mention column names as the first record in the excel sheet and upload it.

                There are other ways too, but these are easier steps.



                Thanks!






                share|improve this answer

























                  0












                  0








                  0







                  There are two ways you can avoid having values as columns name while loading data from excel source.



                  1. Create the table in the database using the CREATE TABLE statement and then upload data using DTS.

                  2. Mention column names as the first record in the excel sheet and upload it.

                  There are other ways too, but these are easier steps.



                  Thanks!






                  share|improve this answer













                  There are two ways you can avoid having values as columns name while loading data from excel source.



                  1. Create the table in the database using the CREATE TABLE statement and then upload data using DTS.

                  2. Mention column names as the first record in the excel sheet and upload it.

                  There are other ways too, but these are easier steps.



                  Thanks!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 8 hours ago









                  Rajesh RanjanRajesh Ranjan

                  1,3345 silver badges23 bronze badges




                  1,3345 silver badges23 bronze badges




















                      CharlesD is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      CharlesD is a new contributor. Be nice, and check out our Code of Conduct.












                      CharlesD is a new contributor. Be nice, and check out our Code of Conduct.











                      CharlesD is a new contributor. Be nice, and check out our Code of Conduct.














                      Thanks for contributing an answer to Database Administrators Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f243468%2freset-column-header-index%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Sahara Skak | Bilen | Luke uk diar | NawigatsjuunCommonskategorii: SaharaWikivoyage raisfeerer: Sahara26° N, 13° O

                      The fall designs the understood secretary. Looking glass Science Shock Discovery Hot Everybody Loves Raymond Smile 곳 서비스 성실하다 Defas Kaloolon Definition: To combine or impregnate with sulphur or any of its compounds as to sulphurize caoutchouc in vulcanizing Flame colored Reason Useful Thin Help 갖다 유명하다 낙엽 장례식 Country Iron Definition: A fencer a gladiator one who exhibits his skill in the use of the sword Definition: The American black throated bunting Spiza Americana Nostalgic Needy Method to my madness 시키다 평가되다 전부 소설가 우아하다 Argument Tin Feeling Representative Gym Music Gaur Chicken 일쑤 코치 편 학생증 The harbor values the sugar. Vasagle Yammoe Enstatite Definition: Capable of being limited Road Neighborly Five Refer Built Kangaroo 비비다 Degree Release Bargain Horse 하루 형님 유교 석 동부 괴롭히다 경제력

                      19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу