Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Append

Status
Not open for further replies.

LucaFcs

Programmer
Mar 23, 2015
3
IT
I have a text file with no delimiter but composed as follows:
173 FLOWER FIL. MERL. 400GRX1,00 CT6E2714 8410063011448
25002 Viennetta VANILLA 6X320 1.00 CT3231BC020 8000920200025

I CREATED QUATO COMMAND:
CREATE CURSOR TIME (Codart C (10), desart C (25), PRICE N (9,2), UM C (2), LOT C (20), BARCODE C (16), EXTRA C (15), N CPROWNUM (3))
APPEND FROM ("c: \ VENDUTO020.TXT") TYPE DELIMITED

BUT WRONG DATA SHOWS
HOW CAN I SAY TO IMPORT IN FIELD1 FROM 0 TO 10, FIELD2 10 TO 25, field3 FROM 35 TO 9 ECC ECC.
THANK YOU
 
 http://files.engineering.com/getfile.aspx?folder=0c8afc80-fcb8-4336-8d61-ddc4d851d833&file=import.prg
Is the TYPE part of that necessary?

APPEND FROM (m.FILENAME) SDF

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
Correct. I like verbose, in the byte code it will be the same anyway.

Imagine
Code:
APPEND FROM MYFILE SDF
Coming back to this code months later or as a new developer, you might be tempted to change it to
Code:
APPEND FROM MYFILE.SDF
...which of course won't work anymore.

But that's just me.

Anyway, that doesn't apply to your version of using (m.Filename).

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top