on 03-06-2014 9:35 AM
Dear all,
I have two database tables:
Table1:
IDNr
Name
Table2:
IDNr
AttachmentName
One entry from table1 could have 0..unbounded entries in table two.
I used a LeftJoin operation for this, but of course all entries from table 1 will
be duplicated if there are more than 1 entries for this in table 2.
IDNr = 123
Name = Test
AttachmentName = project.doc
IDNr = 123
Name = Test
AttachmentName = description.doc
(and so on)
Because table 2 came additionally, I would have to adjusted my complete mapping which
is huge.
Question: Is there a possibility in SQL to create a result structure like this:
IDNr = 123
Name = Test
AttachmentName = project.doc
AttachmentName = description.doc
Thanks
Regards
Chris
Hi Chris,
AFAIK - you can not create column dynamically in select statement. If you know max no of attachment then you can create a view in and call the view from view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.