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

What kind of vegetable has pink and white concentric rings?

Claiming statutory warranty for a fault that resulted in the loss of the product

Why was Quirrell said to be in the Black Forest if Voldemort was actually in Albania?

Plotting maxima within a simplex

Why does airflow separate from the wing during stall?

What should I watch before playing Alien: Isolation?

How did pilots avoid thunderstorms and related weather before “reliable” airborne weather radar was introduced on airliners?

Do I have to mention my main character's age?

Quickest way to move a line in a text file before another line in a text file?

Is it better to have a 10 year gap or a bad reference?

How can I deal with someone that wants to kill something that isn't supposed to be killed?

How can I remove studs and screws from the inside of drywall when installing a pocket door without needing to do paint and patch work on both sides?

How should I handle a question regarding my regrets during an interview?

Reset Column Header Index

Strange LED behavior

Why didn't NASA launch communications relay satellites for the Apollo missions?

"It is what it is"

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

Can "Taking algebraic closure" be made into a functor?

Oriented vector bundle with odd-dimensional fibers

What kind of curve (or model) should I fit to my percentage data?

How much did NASA help with the making of "First Man"?

Reflect IR beam off reflector instead of emitting straight to TSOP receiver

Is it better to merge "often" or only after completion do a big merge of feature branches?



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
    8 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
    8 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
    8 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
    8 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
8 hours ago





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

– Rajesh Ranjan
8 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

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480