Looking for thoughts on the best way to repeat the header row at the top of the exported file.

I have a request to create an extract and they need the header row to be written twice at the top of the file.
I thought maybe a for each loop with a script that reset the increment variable one time before looping through the rest of the dataset, I am curious to hear what other options there are.
Thanks,
P

If it is the same record twice then make it a variable and append twice before the details as per this blog post:
http://agilebi.com/jwelch/2008/02/08/adding-headers-and-footers-to-flat-files/
Arthur My Blog

Similar Messages

  • What is the best way to share a iTunes library between 5 users on the same computer?

    What is the best way to share a iTunes library between 5 users on the same computer?
    Currently I have a common itunes library in a shared folder that each user is linked to.  The problem is that when one user adds music to the shared file, it does not automaticaly appear to other users when they open their iTunes.  They have to go to the shared library and select the new music in order to make it visable in their iTunes.
    Would iTunes file shareing fix this problem?
    Thanks

    aapl.up wrote:
    Rick, are you saying that if you try to share a folder outside of home and use sharepoints, then the other mac wont prompt you to log in? Have you tried that? It is hard to believe that is the case
    I am sort of saying that. Have you tried it? I know it's hard to believe, but you really need to help us out by trying some steps that you don't believe.
    We can't see what your exact situation is. We sort of know what's worked for us out here. Just trying to help you get this going in less than 24 hours!
    Sharepoints manages the samba configuration file. It's free software that puts a pretty face on an otherwise cumbersome config file.
    Give it a shot.
    windows will not prompt for passwords, I have tried this with multiple computer at home for both vista and xp
    As I stated. You will not get prompted on windows, if you have set up sharing in an insecure fashion. You are not using a secured sharing situation.
    No argument with your statement.

  • What is the best way to format a novel w headers  w/o changing the ...

    what is the best way to format a novel w headers w/o changing the following pages. I've used Microsoft office initially, but publishing house uses a program called word perfect. I find that I have too many blank white pages no matter what i do! Have to fix pagination as well...Paul

    When you start you are offered templates under 2 categories "Word Processing" and "Layout", choose wisely.
    For header and footers yes, you will have to:
    +Menu > Insert > Section break+ at the bottom of the last page of the section you wish to preserve.
    Then you can change the next section and the 2 will stay different.
    Please read the Pages09_UserGuide.pdf, you need to know a lot more than this if your novel is ever to hit the streets.
    Peter

  • What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?

    What is the best way to zero a 'custom voltage with excitation' sensor from the front panel?
    Thanks for any help

    Hi Donavan,
    There are two options for zeroing with the NI-9237.  You can perform offset nulling and shunt calibration with a strain task, or if you use custom excitation you can use software compensation.
    See the Bridge Balancing, Offset Nulling section in  the Load, Force, and Torque Measurements tutorial. Take a measurement before the strain is applied and subtract this from all subsequent measurements.  See the above tutorial to consider the tradeoff in accuracy between these two options.
    Hope this helps,
    Jennifer O.
    Applications Engineer
    National Instruments

  • What is the best way to create a read more/collapse text box on the homepage of a site?

    What is the best way to create a read more/collapse text box on the homepage of a site?

    I figured this out by using a lightbox. I set the trigger at the top of the box, hid all initially and added a close button. In the box that would have linked to the first thumbnail for the lightbox, I added a text box that said "read more"

  • What is the best way to track a stolen ipod touch 4th generation if the locations services are off

    What is the best way to tracker a stolen ipod touch 4th generation it the locations services are off

    you will have to use the old fashioned way, like if you lost a wallet or purse.

  • What is the best way to keep your macbook pro in tip top condition. performance wise

    What is the best way to keep the performance of a macbook pro in tip top shape.  Over the years my computer seems to act like a pc with all of its hicups and lockups.
    I am running mountain lion and this computer is approx 2 years old.
    Not sure if there is some sort of software that will help with this or is there something else I can do.
    Thanks
    GAJ

    How to maintain a Mac
    1. Make redundant backups, keeping at least one off site at all times. One backup is not enough. Don’t back up your backups; all should be made directly from the original data. Don’t rely completely on any single backup method, such as Time Machine. If you get an indication that a backup has failed, don't ignore it.
    2. Keep your software up to date. In the App Store or Software Update preference pane (depending on the OS version), you can configure automatic notifications of updates to OS X and other Mac App Store products. Some third-party applications from other sources have a similar feature, if you don’t mind letting them phone home. Otherwise you have to check yourself on a regular basis.
    Keeping up to date is especially important for complex software that modifies the operating system, such as device drivers. Before installing any Apple update, you must check that all such modifications that you use are compatible. Incompatibility with third-party software is by far the most common cause of trouble with system updates.
    3. Don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” "boosters," “extenders,” “cleaners,” "doctors," "tune-ups," “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, such stuff is useless or worse than useless. Above all, avoid any software that purports to change the look and feel of the user interface.
    It's not much of an exaggeration to say that the whole "utility" software industry for the Mac is a fraud on consumers. The most extreme examples are the "CleanMyMac" and “MacKeeper” scams, but there are many others.
    As a rule, the only software you should install is that which directly enables you to do the things you use a computer for, and doesn't change the way other software works.
    Safari extensions, and perhaps the equivalent for other web browsers, are a partial exception to the above rule. Most are safe, and they're easy to get rid of if they don't work. Some may cause the browser to crash or otherwise malfunction.  Some are malicious. Use with caution, and install only well-known extensions from relatively trustworthy sources, such as the Safari Extensions Gallery.
    Never install any third-party software unless you know how to uninstall it. Otherwise you may create problems that are very hard to solve. Do not rely on "utilities" such as "AppCleaner" and the like that purport to remove software.
    4. Don't install bad, conflicting, or unnecessary fonts. Whenever you install new fonts, use the validation feature of the built-in Font Book application to make sure the fonts aren't defective and don't conflict with each other or with others that you already have. See the built-in help and this support article for instructions. Deactivate or remove fonts that you don't really need to speed up application launching.
    5. Avoid malware. Malware is malicious software that circulates on the Internet. This kind of attack on OS X was once so rare that it was hardly a concern, but malware is now increasingly common, and increasingly dangerous.
    There is some built-in protection against downloading malware, but you can’t rely on it — the attackers are always at least one day ahead of the defense. You can’t rely on third-party protection either. What you can rely on is common-sense awareness — not paranoia, which only makes you more vulnerable.
    Never install software from an untrustworthy or unknown source. If in doubt, do some research. Any website that prompts you to install a “codec” or “plugin” that comes from the same site, or an unknown site, is untrustworthy. Software with a corporate brand, such as Adobe Flash Player, must come directly from the developer's website. No intermediary is acceptable, and don’t trust links unless you know how to parse them. Any file that is automatically downloaded from the web, without your having requested it, should go straight into the Trash. A web page that tells you that your computer has a “virus,” or that anything else is wrong with it, is a scam.
    In OS X 10.7.5 or later, downloaded applications and Installer packages that have not been digitally signed by a developer registered with Apple are blocked from loading by default. The block can be overridden, but think carefully before you do so.
    Because of recurring security issues in Java, it’s best to disable it in your web browsers, if it’s installed. Few websites have Java content nowadays, so you won’t be missing much. This action is mandatory if you’re running any version of OS X older than 10.6.8 with the latest Java update. Note: Java has nothing to do with JavaScript, despite the similar names. Don't install Java unless you're sure you need it. Most people don't.
    6. Don't fill up your boot volume. A common mistake is adding more and more large files to your home folder until you start to get warnings that you're out of space, which may be followed in short order by a boot failure. This is more prone to happen on the newer Macs that come with an internal SSD instead of the traditional hard drive. The drive can be very nearly full before you become aware of the problem.
    While it's not true that you should or must keep any particular percentage of space free, you should monitor your storage use and make sure you're not in immediate danger of using it up. According to Apple documentation, you need at least 9 GB of free space on the startup volume for normal operation.
    If storage space is running low, use a tool such as OmniDiskSweeper to explore the volume and find out what's taking up the most space. Move seldom-used large files to secondary storage.
    7. Relax, don’t do it. Besides the above, no routine maintenance is necessary or beneficial for the vast majority of users; specifically not “cleaning caches,” “zapping the PRAM,” "resetting the SMC," “rebuilding the directory,” "defragmenting the drive," “running periodic scripts,” “dumping logs,” "deleting temp files," “scanning for viruses,” "purging memory," "checking for bad blocks," "testing the hardware," or “repairing permissions.” Such measures are either completely pointless or are useful only for solving problems, not for prevention.
    To use a Mac effectively, you have to free yourself from the Windows mindset that every computer needs regular downtime maintenance such as "defragging" and "registry cleaning." Those concepts do not apply to the Mac platform. A computing device is not something you should have to think about very much. It should be an almost transparent medium through which you communicate, work, and play. If you want a machine that is always whining for your attention like a neurotic dog, use a PC.
    The very height of futility is running an expensive third-party application called “Disk Warrior” when nothing is wrong, or even when something is wrong and you have backups, which you must have. Disk Warrior is a data-salvage tool, not a maintenance tool, and you will never need it if your backups are adequate. Don’t waste money on it or anything like it.

  • What is the best way to write 10 channels of data each sampled at 4kHz to file?

    Hi everyone,
    I have developed a vi with about 8 AI channels and 2 AO channels... The vi uses a number of parallel while loops to acquire, process, and display continous data.. All data are read at 400 points per loop interation and all synchronously sampled at 4kHz...
    My questions is: Which is the best way of writing the data to file? The "Write Measurement To File.vi" or low-level "open/create file" and "close file" functions? From my understanding there are limitations with both approaches, which I have outlines below..
    The "Write Measurement To File.vi" is simple to use and closes the file after each interation so if the program crashes not all data would necessary be lost; however, the fact it closes and opens the file after each iteration consumes the processor and takes time... This may cause lags or data to be lost, which I absolutely do not want..
    The low-level "open/create file" and "close file" functions involves a bit more coding, but does not require the file to be closed/opened after each iteration; so processor consumption is reduced and associated lag due to continuous open/close operations will not occur.. However, if the program crashes while data is being acquired ALL data in the buffer yet to be written will be lost... This is risky to me...
    Does anyone have any comments or suggestions about which way I should go?... At the end of the day, I want to be able to start/stop the write to file process within a running while loop... To do this can the opn/create file and close file functions even be used (as they will need to be inside a while loop)?
    I think I am ok with the coding... Just the some help to clarify which direction I should go and the pros and cons for each...
    Regards,
    Jack
    Attachments:
    TMS [PXI] FINAL DONE.vi ‏338 KB

    One thing you have not mentioned is how you are consuming the data after you save it.  Your solution should be compatible with whatever software you are using at both ends.
    Your data rate (40kS/s) is relatively slow.  You can achieve it using just about any format from ASCII, to raw binary and TDMS, provided you keep your file open and close operations out of the write loop.  I would recommend a producer/consumer architecture to decouple the data collection from the data writing.  This may not be necessary at the low rates you are using, but it is good practice and would enable you to scale to hardware limited speeds.
    TDMS was designed for logging and is a safe format (<fullDisclosure> I am a National Instruments employee </fullDisclosure> ).  If you are worried about power failures, you should flush it after every write operation, since TDMS can buffer data and write it in larger chunks to give better performance and smaller file sizes.  This will make it slower, but should not be an issue at your write speeds.  Make sure you read up on the use of TDMS and how and when it buffers data so you can make sure your implementation does what you would like it to do.
    If you have further questions, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • What's the best way to output a high quality ready to send to the printer PDF?

    I'm designing a photo book for a friend and we're having output issues. We're working with a professional printer but for some reason our prints keep coming out soft or pixelated. The images are 300 dpi and formatted correctly for an InDesign document so the issue is likely output.
    What's the best way to output the HIGHEST quality PDF you can out of InDesign? Everyone seems to have different answers.
    Thanks in advance!

    Check a couple things.
    One would be for broken links. If there are broken links then ID will use the preview image instead of the linked image.
    Another would be to select an image that prints poorly in the Links Panel and check the effective resolution. If it is below your stated 300 dpi then the image has been enlarged greater than 100%.
    Then just use the PDF/X-4 profile for your PDF.
    Mike

  • What is the best way to preorder multiple iPhone 6s and take advantage of the $200 trade in deal?

    Here's my scenario.
    Currently: I have 2 iPhone 4 and 1 iPhone 4S
    Plan: Upgrade all three to iPhone 6 Plus (16GB)
    What is the best way to do the $200 trade in deal for each of the old phone?
    http://www.verizonwireless.com/support/faqs/Equipment/trade_in_program.html#iPhone Trade-in Promotion
    1. When I preorder at 12:01 AM do I have to pay $300 or $100 for each?
    2. Do I have to send the old iPhones first in order to get the $200 gift cards?
    What should I do to make sure each preorder can be discounted?

        Vice_Actual,
    Thank you so much for reaching out to us. We are super excited about the launch of the new iPhone. In order to get the trade in deal you would need to trade in the device and then you would get a Verizon Wireless gift card mailed out to you. If you pay for the devices with a credit card on pre-order the card will not be charged until the devices are shipped.
    KevinR_VZW
    Follow us on Twitter @VZWSupport

  • What is the best way to restore very recently deleted partition ?, What is the best way to restore very recently deleted partition ?

    Can anyone please advise the best course of action here:
    I time machined what I thought to be my Mac Pro 1,1 but actually backed up my Macbook Pro 3,1
    I was having problems with main hdd and repair was not working so i deleted partition... and when i ran time machine realised i had not backed up from march.
    Is there anyway to revert to that partitioning or restore it? Any programs?
    Or do I just have to recover the lost files ?

    If the lost data is of high value to you, consider sending the drive to a professional recovery service such as DriveSavers. Otherwise, there's little hope, but some have had at least partial success with a product called "Data Rescue."

  • What is the best way to back up aperture on imac and then take the library on the road for my mcp?

    I have just aquired a lacie triple interface ext drive 1tb, to vault aperture and then take on the road for mcp to access the aperture iamges, looking at some of this forum I dont think this is as easy as i thought so i thought I'd better get some help!
    I have not activated the ext hard drive yet just in case, my imac is backed up with time machine presently.

    Hi Dave
    I use a MBP  and a Mac Mini when on the road
    It has always been my practice not to use the system drive for my photographic data where ever possible always using external drives eSATA and FW for the MBP and using USB drives for Vaults and Clones
    I am working with a growing Libary at the moment 720GB + 500 GB of referenced files on a second HDD
    I will be scooting down the A30 with a couple of HDDs and my MBP on my way home and whilst there I will be using the my MBP  to add new images to my aperture Libary and Referenced Drive and work on some of my existing files
    For the last four years I have used a Ruggedised 500GB FW/USB drive to store copies of my CF cards when on a shoot you need the MBP to transfer from CF to HDD but once on the HD any future transfer is quick.
    Only reusing it when I have the contents in at least two external HDD's at different locations
    I have a Mac Pro and Wiebetech 4bay eSATA external at my studio (It takes bare drives)
    Two years ago I did move to using an eSATA EspressCard|34 with my MBP (which only has a 200GB internal) which has ineffect given me a  2TB external running as if it's an internal drive (Ruggedised eSATA) as my Aperture Library and PS scratch file drive.
    And 2TB USB drives as Vault backup
    I have never been a Time Machine fan from the early days when there were problems when running Aperture, I'm sure it's improved but I have my own work flow routine
    I use SuperDuper form Shirt Pocket
    I recently purchased a couple of 2TB WD Green 2TB SATA 6Gbps 64MB Cache Power Saving Internal Hard Drives
    for £60 each and two empty Lacie cases for £18 each from Amazon so storage has never been cheaper I normally use bare drives but the cases are better when I am away from base and its easy to remove them
    Hope this helps
    Phil G
    PS. If you're down Penwith over the next month look me up and I show you the set up

  • What is the best way to repeatedly load random commercials?

    Hi Everyone,
    Any help with the above question would be useful.  Here's my end goal: I want to display commercials on a screen at my wife's bakery.  The script should load one commercial, play it, then unload it, randomly load another, and so on.
    I am completely new to as3 and have unsuccessfully been following several online tutorials.  My first attempt had code in each commercial file (swf), that randomly called up another commercial, which in turn called up another file, and so on--but this became a memory hog and crashed the program after a few minutes.
    Since then I have created one main swf file that loads an xml file, which holds all the information for the commercials.  However, when the swf commercials are loaded according to the xml file, they don't play properly: when the first commercial finishes playing, the next one is already partially done.  Obviously it started playing earlier.  The swfs should unload and load the next according to a timer, with the length of the timer being different for each swf according to the xml data.  Even with this, the first swf didn't always stop when it should.  My code is getting complicated and the display looks sloppy.
    I think something like this should be a simple way to display media such as these commercials, but I still haven't found a working solution.  Now I'm wondering if I'm even approaching this wisely.
    Would it be better to convert the swf to flv and create an flv player that has 'continuous play' and 'shuffle' features?  Would it be better to convert each swf into movieclips and put them all into one swf?  (I like the manageability of using an external xml file; I will be adding and removing commercials frequently and want to keep this as simple as possible.)
    Please let me know what you think is the wisest approach and refer me to any relevant tutorials.
    Peace,
    Trevor

    Thanks again kglad,
    I followed your advice, but it is still not working properly.  Here's my problem:
    The external swfs continue playing in the background.  Consequently, the event "playcomplete" was dispatched not only at the end of the swf that is being shown, but also at the end of the looping, previously loaded swfs that are not visible; this made the next swf play before the one being shown finished.  That seemed easy enough to fix by adding stop(); to each external swf on the last frame.  I thought everything was fixed -- but those swfs must still be there and are hogging memory before they can be collected for garbage. I've developed a loop that continues to load swfs, taking more and more memory, eventually causing a crash.  So:
    After a swf is loaded, how do I completely remove it to free up memory?  I'll attach the code I'm using, but I've made some adjustments to your previous examples (using a string with a random number instead of an array, using different variable names, etc).  Would I still have this memory problem if I used an array?  I have tried to remove eventListeners, to use weak eventListeners, and to remove the loaded Child as best as I know how, but I need some guidance on memory management before I can use this.
    Peace,
    Trevor
    var swfLoader:Loader = new Loader();
    var klaesiSwfs:XMLList;
    var totalSwfs:Number;
    //var swfArray:Array = ["swfs/movie1.swf", "swfs/movie2.swf", "swfs/movie3.swf", "swfs/movie4.swf", "swfs/movie5.swf"];
    //loads xml//
    var klaesiXmlLoader:URLLoader = new URLLoader ();
    klaesiXmlLoader.load(new URLRequest("xml/swf_depot.xml"));
    klaesiXmlLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    //finds how many swfs are on xml//
    function processXML (e:Event):void{
         var klaesiXml:XML = new XML(e.target.data);
         klaesiSwfs=klaesiXml.ID;
         totalSwfs=klaesiSwfs.length();
         //trace ("Total is " + totalSwfs);
         loadRandomSwf();
         klaesiXmlLoader.removeEventListener(Event.COMPLETE, processXML)
         klaesiXmlLoader = null;
    //loads swfs//
    function loadRandomSwf():void {
         var num:Number = (Math.floor(Math.random() * totalSwfs) + 1);
         var swfName:String = "swfs/movie"+ num +".swf";
         var requestSwf:URLRequest = new URLRequest (swfName);
         swfLoader.load(requestSwf);
         addChild(swfLoader);
         swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, playComplete, false, 0, true);
    //listens for the end of each swf//
    function playComplete(e:Event){
         MovieClip(swfLoader.content).addEventListener("playNextCommercial", nextSwf, false, 0, true);
         swfLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, playComplete)
    //removes old swf, starts new swf//
    function nextSwf(e:Event){
         MovieClip(swfLoader.content).removeEventListener(Event.COMPLETE, nextSwf);
         removeChild(swfLoader);
         loadRandomSwf();

  • What is the best way to add a large number dynamic VI's in the application builder?

    Is there a way to add all the VI's in a directory tree or library file as "Dynamic VI's" in the application builder (7.1 on Windows XP SP2)?
    Thanks,
    Mark Moss

    LabVIEW 7.1: From what I can tell, you can only add dynamic VIs one file at a time, while for support files, you can add entire folder contents.
    Have you considered uprading to LabVIEW 8.0? Things like this have been improved dramatically! You can keep all your dynamic VIs in a project folder, then add it to the build specification in one click.
    LabVIEW Champion . Do more with less code and in less time .

  • HT5996 What is the best way to find out what OS all Mac users on the server are running?

    I am the administrator of both Windows PC's as well as having 12 Mac-mini users.  I know several users have not updated their OS in quite a while.  Is there some way for me to find out what version a user is running beside going from one computer to another? 
    I do have OS X Server if that makes a difference.
    I have been working with Mac's for less than a year, so I'm a work in progress when it comes to the Mac World.
    Thanks!

    If you're able to log into those computers, check the content of the file /System/Library/CoreServices/SystemVersion.plist on them. If you're working from a Mac, you may also be able to find out by selecting the drive in the Finder and choosing Get Info from the File menu.
    (115722)

Maybe you are looking for

  • Firefox crashes 3 seconds after I open it. What to do?

    I have this problem for a few days, mozilla keeps crashing (even if going in safe mode) and i don't know why, or what to do. I just open it, it loads foar a few seconds and then crashes and asks me to send the report. I need help cause I got a few ta

  • OS X Yosemite Hangs--A Lot

    I've been having an ongoing problem with my system hanging every four or five days. The only workaround I've found is to restart every three or four days before the hang can occur. I'll come back to the iMac after having been away for a few minutes (

  • Remote issues

    I am attempting to pair my iPhone's Remote App with the iTunes Library on my computer.  Both have Home Sharing on and enabled, yet my iPhone Remote App doesn't detect it as a possible controle-able library.  Likewise when I use the "Add Library" butt

  • Use of instanceof  in java

    can any one tell me the use of instanceof keyword in java .and how it is used. and were it is used reply me regerd saravana

  • ICal not working with IIS?

    I'm serving an iCal file (.ics) from IIS on windows but iCal can't subscribe to it using anything other than basic authentication. If I configure IIS to use digest or integrated windows authentication iCal says "access denied." Safari is able to down