Using AS to rename a field
Using AS to rename a field
(OP)
Hello,
Me again...
I have a problem using AS to rename a field.
Here is the source code :
TABLE FILE MYFILE
PRINT MYFIELD AS 'NEWNAME'
ON TABLE HOLD AS HOLD1
END
TABLE FILE HOLD1
PRINT NEWNAME
END
This works when I run it from the editor or from the saved procedure but it does not work when run from ReportCaster.
The error messsgae is INF32073.
Thank you
Me again...
I have a problem using AS to rename a field.
Here is the source code :
TABLE FILE MYFILE
PRINT MYFIELD AS 'NEWNAME'
ON TABLE HOLD AS HOLD1
END
TABLE FILE HOLD1
PRINT NEWNAME
END
This works when I run it from the editor or from the saved procedure but it does not work when run from ReportCaster.
The error messsgae is INF32073.
Thank you
RE: Using AS to rename a field
try this
SET ASNAMES=ON
RE: Using AS to rename a field
I already tried it and even with ASNAMES=ON ReportCaster does the same error. But it works if run from the editor. :-/
RE: Using AS to rename a field
RE: Using AS to rename a field
?FF HOLD1
This will show what fields are found in the HOLD file called HOLD1. You may find that there's another HOLD1.MAS somewhere. To find where it is, issue:
WHENCE HOLD1 MASTER
and it'll tell you where the HOLD1 Master file is found.
RE: Using AS to rename a field
?FF HOLD1 run from the editor returned "NEWNAME" (renamed field).
?FF HOLD1 run from ReportCaster returned "MYFIELD" (original field).
WHENCE HOLD1 MASTER returned the file path but Icannot find the file HOLD1.MAS because it was already deleted I think.
RE: Using AS to rename a field
I have done a big mistake. Instead of typing "SET ASNAMES=ON" I typed "-SET ASNAMES=ON".
Thank you for your help, sorry for the mistake