No announcement yet.

how can i generate the text file

  • Filter
  • Time
  • Show
Clear All
new posts

  • how can i generate the text file

    i want to auto generate a text (.txt) file with the same information except the last field. if i want to add 3 lines and save it to a txt format.

    insert into serialnum(partnum, datecode, snum) values('xxx-xxx-xxx','ddcc','00001');
    insert into serialnum(partnum, datecode, snum) values('xxx-xxx-xxx','ddcc','00002');
    insert into serialnum(partnum, datecode, snum) values('xxx-xxx-xxx','ddcc','00003');

    any can please help. I would appreciate it.

  • #2
    yhb You have been a forum member for over ten years, surely you know how to read the manual?
    Found this in my archives - please study the code


    • #3
      thanks, i have that but it does only give you one line item at a time. I'm looking for something i want that code to be written 100 times then save as a text file.


      • #4
        Hi, just use a loop. eg x=1,100 etc or post example of YOUR code


        • #5
          It's called apped or something like that, it means add to file on top of the file you have or you can do better and used the table to text file each table is a new line
          Plugins or Sources MokoX
          BunnyHop Here


          • #6
            Separate your 'last field' as a concatenated variable. And then initiate a +1 count loop. Ain't brain surgery.


            • #7

              Here you go, have at look at this. It's something that uses a +1 count loop to repeat outputted strings. It's not exactly what you're after - but demonstrates the basic principal at work. (And as mentioned before, split your string into 2 concatenated variables to achieve the desired output for your last field)

              Don't panic when you run this .apz - it's just a "gag/joke' app I made back in 2010. To stop it running, just hit your ESCAPE key.
              Attached Files