1
I have the tables (and their relationships) of the diagram below:
I need to do this: Bring all the fields of the TBCADCRE table and an extra column called ADQ with all the TIPADQ that the user has (can have a maximum of 6) separated by ",".
To improve understanding, I made a select with the 3 tables, but it returns a row for each TIPADQ that the user has (image below).
I need to bring a single line and all Tipadqs within the same field separated by ",". Ex: CIELO,STONE,POS...
Can anyone help me? Thank you.
You can always get inside one
loop
orcursor
fill in the columnTIPADQ
concatenating all lines into one.– João Martins
Thanks João! I will search for loop in SQL and then update here! ;)
– Daniel Afonso
Possible duplicate of Concatenate results
– Sorack