Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6726441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:55:40+00:00 2026-05-26T09:55:40+00:00

There are only 3 files that can be created : File_1, File_2 and File_3.

  • 0

There are only 3 files that can be created : “File_1”, “File_2” and “File_3”. The same variable name is used in each instance (User::FileDirectory) and (User::File_name), but because the actual value of the variable changes, a new file is created.However the files are only created if there is data to go into the file. i.e. if there are no records to populate the file, it will not be created at all. When the files are created, the date the file was created should also be added to the filename. eg: File1_22102011.txt

Ok if the above was a little confusing, the following is how it works,

All the files use the same variable, but it is reset before each file is created.

• So it populates a result set in memory with the first sql selection (ID number, First_Name and Main_Name). It sets the file variable to “File_1”. If there are records in the result set, it creates and writes to this filename.

• Then it creates a new result set with the second selection(Contract No). It sets the variable to “File_2”. If there are records in this new result set, a new file will be created from the variable(which now has a new value)

• Finally a third result set is created (Contract_no, ExperianNo, Entity_ID_Number, First_Name, Main_Name), and the file variable is set to “File_3”. Again if there are records in the result set, then this file will be created and written to.

I have worked on a few methods to achieve this but they all have failed, So little help will be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:55:41+00:00Added an answer on May 26, 2026 at 9:55 am

    While what you have works, I think it’d be rather painful to maintain.

    I would approach it as 3 sequence containers running in parallel. Each container would have a data flow and two file tasks hanging off it based on success of the parent and the value of row count variable. If the row count variable is 0, delete the file. If it’s greater than 0, rename it to File_n

    As you can see, I have a container for the first file. The data flow creates an output a.txt file. Based on the value of the variable @RowCount1, it will either delete the empty file or rename it to File_1.

    Control flow pattern

    Each data flow would look like a source query, a row count transformation and a file destination with a temporary name (a.txt, b.txt, c.txt). As a file is always created, even if it’s empty, we will need to delete or rename it afterwards which will be accomplished based on the file operation tasks.

    In my opinion, this approach will be cleaner as it will allow you to test and debug each item in a cleaner manner rather than dealing with an in-memory dataset.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any editors that can edit multi-gigabyte text files, perhaps by only loading
I have created a an OBJ loader that can import .OBJ files that were
I created a program that iterates over a bunch of files and invokes for
I assumed there were only bug fixes/(no new types) in .NET 2.0 SP1 until
Is there any way to make some sections of the web.config file only apply
My Flex application records audio-only FLV files using red5--I'd like to convert these to
I was wondering if there's a way to do a lua file only once
Some classes, like exceptions or templates, only need the header file (.h), often there
I'm trying to click on a link using jquery. There only appears to be
There's only room for three lines of text in the interface, but the content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.