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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro substitution for field names 1

Status
Not open for further replies.

SitesMasstec

Technical User
Sep 26, 2010
502
BR
Hello colleagues!

I am trying to generate a TXT file from this:
Code:
COPY TO INTEGRA\CADASTRO FIELDS '&CheckTotal' TYPE DELIMITED

Note: CheckTotal=" CCODI, CNOME, CENDE "

I am getting syntax error.

I have to use CheckTotal variable because fields names will vary.



Thank you,
SitesMasstec
 
Try this

Code:
COPY TO INTEGRA\CADASTRO FIELDS &CheckTotal TYPE DELIMITED

or

Code:
cmd='COPY TO INTEGRA\CADASTRO FIELDS '+CheckTotal+' TYPE DELIMITED'
&cmd
 
Yes Jack!

Code:
cmd='COPY TO INTEGRA\CADASTRO FIELDS '+CheckTotal+' TYPE DELIMITED'
&cmd
worked fine!


Thank you,
SitesMasstec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top