Append data from two different parameter values into a temporary table and using BCP write out the data.

  • I am trying to find out the best possible solution for an enhancement to output data in a particular way. The process that I am doing deals with regions and perils and outputs data with respect to a combination of one region and one peril. For example, CA region can have EQ, FF, SL perils associated with it. The output for all these combinations will be separate output files created using BCP queryout function once the data is trimmed and scrubbed as per business rule. To give an exact picture, the above example I explained will create 3 output text files, such as, CA_EQ.txt, CA_FF.txt, CA_SL.txt. This is currently working as per the requirement. But there has been a new requirement which demands a particular strategy. As per my business requirement, there is a new peril called fire. This new peril is required to output text files in such a way that it needs to pick only certain LOB’s for its processing and exclude the LOB’s used for fire processing while processing FF peril. The output has to contain both FF and FR perils data in one single text file. For example, CA should contain CA_FF.txt and CA_FR.txt as CA_FF.txt. How can this be accomplished?

  • You can either hard-code the variations into your queries (easy to do but a bad idea), or you can build a table saying which categories belong to which files, and join to that (little bit more work, but definitely a better idea).

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply