×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using AS to rename a field

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

RE: Using AS to rename a field

hi!
try this
SET ASNAMES=ON

RE: Using AS to rename a field

(OP)
Hello,
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

(OP)
Could anyone help me please?

RE: Using AS to rename a field

After you issue the HOLD AS HOLD1 and END, can you issue the following:

?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

(OP)
Hello

?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

(OP)
OK, problem solved.

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close