Home Forums SQL Server 2008 SQL Server Newbies SQL query statement for copying data from different rows to different rows RE: SQL query statement for copying data from different rows to different rows

  • SELECT *, [COMCOD]

    ,[ACTCODE]

    ,[ACTDESC]

    ,[ACTELEV]

    ,[ACTTYPE]

    ,[ACTTDESC]

    ,[USERCODE]

    FROM [ASTREALERPDBR].[dbo].[ACINF]

    WHERE [COMCOD]=3306 OR [COMCOD]=3307

    Result's are (small portion),

    COMCODACTCODEACTDESCACTELEVACTTYPEACTTDESCUSERCODECOMCODACTCODEACTDESC

    3306810100010002Other's Income23306810100010002Other's Income

    3306810100010003Associaltion Fee (Sales)3306810100010003Associaltion Fee (Sales)

    3306810100010004Discount Received From Flat Owner3306810100010004Discount Received From Flat Owner

    3307110000000000Non Current Assets3307110000000000Non Current Assets

    3307110100000000Fixed Assets3307110100000000Fixed Assets

    3307110100010000Fixed Assets3307110100010000Fixed Assets

    3307110100010001Furniture & Fixture201010013307110100010001Furniture & Fixture

    3307110100010002Telecommunication201010013307110100010002Telecommunication

    3307110100010003Office Equipment201010013307110100010003Office Equipment