I have two columns that begin with the same set of characters. I use an Across to create a HOLD file. Both columns end up having the same name. How do I prevent this?
Here's an example:
SET ASNAMES=ON
TABLE FILE EDUCFILE SUM COURSE_CODE COURSE_NAME ACROSS EMP_ID ON TABLE HOLD AS H1 END TABLE FILE H1 PRINT * END
I thought SET FIELDNAME=NEW might do it (NEW is the default), but this did not work.
December 10, 2004, 04:03 AM
TexasStingray
I'm not sure if you can prevent this. you can issue a ? HOLD H1 and this will show you what layout (Fieldname, ALIAS and format) you can reference each field by there alias.
Example: PRINT E01 E02 etc...
Hope this helps
December 10, 2004, 02:31 PM
David Briars
Hi Pietro,
Try adding the 'AS' phrase to each verb object:
Adding the following code to your report:
COURSE_CODE AS CODE<br />COURSE_NAME AS NAME
Yields:
CODE071382660 NAME071382660 ------------- ------------- 101 FILE DESCRPT & MAINT Regards, DaveThis message has been edited. Last edited by: <Mabel>,
December 10, 2004, 02:54 PM
<Pietro De Santis>
Thank you.
This technique only works if the ACROSS column is less than 12 characters long.
December 10, 2004, 03:36 PM
susannah
but so way better than it used to be. i think the lim was 6, and it would give you COD001 COD002 COD003... , which wasn't bad really,
December 10, 2004, 03:45 PM
<Pietro De Santis>
In the brave new world we're living in, it should be 66.