Home > database >  Pb will related records in a database table according to the format to generate a text file
Pb will related records in a database table according to the format to generate a text file

Time:09-20

I want to write a piece of code in pb, a field in a database table according to the following the format of the output to a text file, do not use saveas function, how to do, please tell the warrior to code, the output format is:

Unit a Tom, dick and harry fifty
Unit 2 the li sun five 2
Li six
Three piece liu 2 units

CodePudding user response:

Please give the value of the field in the database

CodePudding user response:

Not clear what is stored in your field, so the code didn't send written

CodePudding user response:

In the database is stored in the
Unit name

Unit one zhang
Unit one li si
Unit one zhang five
Unit 2 the li

CodePudding user response:

Using FileWrite function

CodePudding user response:

Warrior can code

CodePudding user response:

1, according to the unit group
2, every staff's name in the group with separator is connected into a string variable
3, use FileWrite written to open in a text file,

CodePudding user response:

SAVEAS useful, why not?
Then use loop statement + the getitem + filewrite

CodePudding user response:

Ranks first need is converting SQL statement
The original poster can search in the SQL version, a lot of

You can then export
  • Related