Select from a table within a cell of another table

Asked

Viewed 299 times

2

In the SQL SERVER 2012 it is possible to construct a table that in one of its columns contains the result of another table?

The master key would be the reference.

inserir a descrição da imagem aqui

  • Not like this, but it might be keeping one array in the column, separating the results by comma maybe.

  • 1

    You need this to present the result in some report?

  • Yes @Cantoni, need for a report.

  • @I believe you’re mixing the responsibilities. This kind of thing you need should be solved in the view (report, HTML, etc). SQL should only provide the data and not format it the way the user wants to view it.

  • Thanks @Cantoni, I was really thinking yesterday and what needs to be done is in php, do a routine inside. What’s the best thing to do with the question? Close?

  • That’s it. Solve it in another layer. On the question, I’ll signal you and the moderators will do something.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.