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

need looping help

need looping help

(OP)
I have a source schema that can have 1-4 PID segments.  However, I need my output to create 4 output records regardless of how many PID's there are.  How can I simulate extra source hits.  

source schema looks like:

PID
  rec1desc
/PID
PID
  rec2desc
/PID

target looks like

rec1
   tag1  (TAGS ARE HARDCODED)
   outputfield1
/rec1
rec2
   tag2  (TAGS ARE HARDCODED)
   outputfield2
/rec2
rec3
   tag3  (TAGS ARE HARDCODED)
   outputfield3
/rec3
rec4
   tag4  (TAGS ARE HARDCODED)
   outputfield4
/rec4

if input data looks like (notice only 2 records here)

pid
   testing1
/pid
pid
   testing2
/pid

then I need output to look like this:(notice the first value in this .csv output was the hardcoded tag value)

Description 1,testing1
Description 2,testing2
Description 3,
Description 4,

the final output file is positional by row so that is exactly why I need this many records generated.  even though there were only two records, the last two just have empty values.


 

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