Read a table within a table

  • I have a table with articles and a view with additional article information. For an article in the table I can found more records in the view. See example:

    Table:

    Article

    0420012

    0420016

    0420018

    View:

    StringName Expr1Expr2featureUnitvlgprefixsuffixseperator1

    0420012Merk NULLMegaMega1NN

    0420012Verbinding1NULLhose tailhose tail21NN x

    0420012Nokafstand1MM40NULL40CD(mm)28YN x

    0420012MateriaalbrassNULLbrass brass 3 NN

    0420012Maat1Inch1/2NULL1/2"5NY x

    0420012Maat1MM13NULL1313 mm7NY x

    So in my tabel I find article 0420012, in the view I see 6 lines. Now I have to make a SQL what reads the table and concat all values from the view (field feature and unit) in 1 result field, so in the example this must be something like:

    Mega hose tail 40 CD(mm) brass 1/2" 13mm

    Can someone advice me how to do this?

    Bert

  • This is a good article on how to concat row values:

    Concatenating Row Values in Transact-SQL[/url]

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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