how to create new table columns in access?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beginner2012
    New Member
    • Jan 2012
    • 2

    how to create new table columns in access?

    Hi there,

    This may be a easy question, but I am an Access beginner and not very good at vba.

    right now I have the data in the following format:

    Code:
    [U][B]ASSET   HOLDING  STATUS  AMOT[/B][/U]
    asset1      1      EGL     5
    asset1      1      UGL     6
    asset1      1      FVA     7
    asset1      4      EGL     8
    asset1      4      UGL     9
    asset1      4      FVA    10
    asset2      5      EGL    11
    asset2      5      UGL    12
    asset2      5      FVA    13
    I want to split up the Status into 3 columns
    Code:
    [U][B]ASSET   HOLDING  EGL  UGL  FVA[/B][/U]
    asset1      1     5    6    7
    asset1      4     8    9   10
    asset2      5    11   12   13
    I very much appreciate whoever can give me some advice. Thank you very much
    Last edited by NeoPa; Jan 24 '12, 06:11 PM. Reason: Fixed layout and question from later post
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use a crosstab query for that, don't modify the table.

    Comment

    • beginner2012
      New Member
      • Jan 2012
      • 2

      #3
      the problem is that this is my middle step. I need this table in new format to keep going on other steps

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        That's not good thinking. Trust Rabbit on this one. You can always use a query pretty well anywhere you're thinking about using a table.

        Comment

        • ChrisPadgham
          New Member
          • Jan 2012
          • 11

          #5
          If you must do it, then create a crosstab query, save it, then create a make table query based on the saved crosstab query.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            But the thing is there's not really a need for a make table. Anything you need to do with a table, you can probably do with a query.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #7
              Originally posted by Rabbit
              Rabbit:
              Anything you need to do with a table, you can probably do with a query.
              That being the fundamental point.

              Comment

              • ChrisPadgham
                New Member
                • Jan 2012
                • 11

                #8
                except of course if you want to update the data, crosstab queries are not updateable

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32633

                  #9
                  That's true Chris, but we're working with an OP who isn't making the details very clear (probably because they don't appreciate what they need to do - no criticism), so we have to make intelligent guesses. It's very rare (though not entirely unheard of, of course) that people want to update data that is a direct result of processing other data.

                  Using the concepts of normalisation, one would suggest that any such changes should be made in the original data, rather than any derivative intermediate table, and re-derived. This (Normalisation theory) is also strong reasoning for suggesting that, except in extraordinary circumstances, the data is manipulated at source via queries rather than by duplicating the data (in a MakeTable query) for processing.

                  PS. I've noticed some helpful posts from you recently (today/yesterday) and want to welcome you to Bytes. Clearly you have something to offer the community, and I like your attitude already (Finding so many threads to contribute to in such a short space of time).

                  Comment

                  Working...