Sql database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nav mac
    New Member
    • Dec 2011
    • 12

    Sql database

    I have columns H,I,J,K,L,M in excel and a column M is the sum of (H,I,J,K,L)in excel but if I want to import the excel data to SQL how can I acheive this functionality.
    Also for each of the columns H through M ,I need the total at the end.

    eg: H I J K L M
    t1 t2 t3 t4 t5 (t1+t2+t3+t4+t5 )
    tt1 tt2 tt3 tt4 tt5 (tt1+tt2+tt3+tt 4+tt5)
    ............... ............... ............... ..

    Total T1 T2 T3 T4 T5 T6

    Can anyone please help me out, as i have very less time to do this.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Open management studio, right click the database, click tasks > import data.

    Comment

    • nav mac
      New Member
      • Dec 2011
      • 12

      #3
      Thank You so much for your reply rabbit,apprecia ted.

      I have imported the data from excel to sql table but there are some excel files in which column M is the sum of columns H,I,J,K,L . So if I want the same functionality to be imported to sql how can i acheive it. I need Grand Total column at the end and a total row at the end of the rows how can i do this??????????? ????? please help me out , iam really new to this and iam so much frustrated . Trying to search evrywhere i can but no luck till now. Please reply.....

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You don't normally do total rows in a database. That function is reserved for the reporting software you have chosen to use.

        Comment

        • nav mac
          New Member
          • Dec 2011
          • 12

          #5
          Oh okay so I cannot import sum of the columns as is to the database tables. I understand now. Thank you soooooooooooooo o much for your help. I have one more question rabbit, I can sum the columns of a table thru a query and add that sum column in the table right. Please correct me if iam wrong.

          Once again thank you so much.....

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            You can. But it's not recommended. It is better to calculate on demand rather than storing the totals.

            Comment

            • nav mac
              New Member
              • Dec 2011
              • 12

              #7
              Okay thank you rabbit...I understand now. you have been so much helpful...thnx a ton

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                Not a problem, good luck.

                Comment

                • nav mac
                  New Member
                  • Dec 2011
                  • 12

                  #9
                  Hello,

                  how can i send db tables as an xml format to my customer.
                  In ssms there is an icon as 'Results to file' & when i right click on this i checked(checkbo x) on XML Editor but my o/p window is empty. how can i acheive this ? can anyone please help me out in this regards.

                  thanks,
                  nav

                  Comment

                  • Rabbit
                    Recognized Expert MVP
                    • Jan 2007
                    • 12517

                    #10
                    This is a new question. Please create a new thread for it.

                    Comment

                    Working...