INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Concatenate multiple cursor results Into one row using SPUFI

Concatenate multiple cursor results Into one row using SPUFI

Concatenate multiple cursor results Into one row using SPUFI

(OP)
Hi All,

I have googled this as well as searching the forum where I found this (563117) and from what I can gather what I want to do is not possible in SPUFI (I already have it running in a CICS program, I was just intrigued to see if it was possible within SPUFI).

I have a parent table & a child table that has one to many records relating to the parent.
Is there a way of writing a bit of SPUFI that will bring back the parent key & each child record concatenated together into a single row?

For example.
T1
PK     DESC
1      Row1
2      Row2

T2
FK     TYPE     DESC
1      1        HELLO
1      2        MY
1      3        NAME
1      4        IS
2      1        JOHN
2      2        SMITH

So that the result would be
T1.PK, T1.DESC, CONCAT_OF_T2.DESC
1    , Row1   , HELLO MY NAME IS
2    , Row2   , JOHN SMITH
 
I have managed it in SPUFI using joins but I need a join per child row & because I don't know what the maximum would be it's not really feasible (although still useful as most of the time there are 3 rows or less)

If anyone has any advice if this is even possible in SPUFI or can point me in the right direction that would be much appreciated.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close