Announcement

Collapse
No announcement yet.

how can i generate the text file

Collapse
X
 
  • 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
    InputTextToFile.apz
    Cheers

    Comment


    • #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.

      Comment


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

        Comment


        • #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

          Comment


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

            Comment


            • #7
              //Edit

              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)

              Nb.
              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

              Comment

              Working...
              X