Query help...

    Date: 03/08/06 (SQL Server)    Keywords: database, sql

    I am trying to transform data from an old Image database to MSSQL and I have hit a wall on this one table.

    The schema of the Image table is

    old_table(
    id char(10),
    desc_text char(70),
    eff_yrq_beg char(4),
    ln_num char(2))

    There are multiple records (ln_num) for each id that in order create a description text block.

    What I am envisioning is a table

    new_table(
    id varchar(10),
    description varchar(500),
    eff_yrq_beg char(4))

    In the new table the description is a concatenation of the desc_text from the first table in order by ln_num.

    Is there any way that you can think to do this without cursors?

    Source: http://community.livejournal.com/sqlserver/45175.html

« Output Validation? || Another informative... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home