Column Names to Column Headers

  • I have a table with the following values:

    Col1 Col2

    System Name ACCTLZUBKOVAS06

    OS Name Microsoft Windows XP

    Version 5.1.2600

    System Manufacturer IBM

    System Model 2686DHU

    Processor x86 Family 6 Model 13 Stepping 8 GenuineIntel

    Total Physical Memory1,024.00 MB

    IP Address XXX.XX.X.XX

    IP Address XXX.XX.X.XX

    Version 3.10

    Version 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)

    Drive C

    Description Local Fixed Disk

    Free Space 45.99 GB (49,379,762,176 bytes)

    Drive D

    Description CD-ROM Disc

    How can I query this table to show?

    System Name OS Name Version System Manufacturer

    ACCTLZUBKOVAS06 Microsoft Windows XP 5.1.2600 IBM

    Any Help would be appreciated

    Marty

  • how will u show DRIVE cos u have 2 drive (C and D) and Version?

     

  • Sorry the table format is like:

    Col1 COl2

    System MYPC

    OS Name MS XP

    Version 5.1

    Drive1 C

    Drive2 D

    What I need:

    System OS Name Version Drive1 Drive2

    MYPC MS XP 5.1 C D

    Appreciated

  • Unless you have a 3rd column the identifies all of the entries that belong to a given system, it can't be done.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • What if some computers have more than 2 disks?

    _____________
    Code for TallyGenerator

  • The drives are just column values. I have imported a text file that has that following properties

    Table 1

    Col1,Col2

    A,1

    B,2

    C,3

    D,4

    What I need is a format like

    Table2

    A,B,C,D

    1,2,3,4

  • Uh huh... for WHICH SYSTEM?  Unless you only have one system in the data, it is impossible to determine which system these drives are for unless you have a third column for the SystemID or some such.

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Translate, please.

    I've got on my computer drives A:, C:, D:, E:, and CD_ROM O:

    How you gonna report such system?

    And answer Jeff's question finally.

    _____________
    Code for TallyGenerator

  • Better than that, post the raw data as it appears in the file for the first 3 systems...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I guess my question has not been properly formatted for that, my apologies.

    All I’m trying to do is query the table in such a way that the Values for COL1 are made Column Names. The values in COL1 are inconsequential, there are no systems involved. I just used irrelevant Data.

    Before

    COL1, COL2 (Column Names)

    1,2 (Values)

    2,3

    3,4

    After

    1,2,3 (Column Names)

    2,3,4 (Values)

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply