BookmarkSubscribeRSS Feed
France
Quartz | Level 8

Dear All,

 

Could you please give me some suggestion to record the following excel A as table B in the SAS,

 

Excel A

 

Name

MOOG 'A'BOEINGUNITED TECHNOLOGIES
CodeU:MOG.A(P)U:BA(P)U:UTX(P)
CURRENCYU$U$U$
28/05/19802.04944.98172.6562
29/05/19802.04944.88912.625
30/05/198025.09292.6719
02/06/198025.14842.7344
03/06/19801.97535.14842.7344
04/06/19801.97535.2782.7969
05/06/19801.97535.16692.7812
06/06/19801.97535.05582.7656
09/06/19801.97535.07432.7109
10/06/19801.97535.18552.6797
11/06/19801.97535.46322.7344
12/06/198025.37062.6797
13/06/198025.46322.7031
16/06/198025.44472.7266
17/06/19802.02475.37062.7109

 

 

Table B

NameCodeCURRENCYDATEPrice
MOOG 'A'U:MOG.A(P)U$28/05/19802.0494
MOOG 'A'U:MOG.A(P)U$29/05/19802.0494
MOOG 'A'U:MOG.A(P)U$30/05/19802
MOOG 'A'U:MOG.A(P)U$02/06/19802
MOOG 'A'U:MOG.A(P)U$03/06/19801.9753
MOOG 'A'U:MOG.A(P)U$04/06/19801.9753
MOOG 'A'U:MOG.A(P)U$05/06/19801.9753
MOOG 'A'U:MOG.A(P)U$06/06/19801.9753
MOOG 'A'U:MOG.A(P)U$09/06/19801.9753
MOOG 'A'U:MOG.A(P)U$10/06/19801.9753
MOOG 'A'U:MOG.A(P)U$11/06/19801.9753
MOOG 'A'U:MOG.A(P)U$12/06/19802
MOOG 'A'U:MOG.A(P)U$13/06/19802
MOOG 'A'U:MOG.A(P)U$16/06/19802
MOOG 'A'U:MOG.A(P)U$17/06/19802.0247
BOEINGU:BA(P)U$28/05/19804.9817
BOEINGU:BA(P)U$29/05/19804.8891
BOEINGU:BA(P)U$30/05/19805.0929
BOEINGU:BA(P)U$02/06/19805.1484
BOEINGU:BA(P)U$03/06/19805.1484
BOEINGU:BA(P)U$04/06/19805.278
BOEINGU:BA(P)U$05/06/19805.1669
BOEINGU:BA(P)U$06/06/19805.0558
BOEINGU:BA(P)U$09/06/19805.0743
BOEINGU:BA(P)U$10/06/19805.1855
BOEINGU:BA(P)U$11/06/19805.4632
BOEINGU:BA(P)U$12/06/19805.3706
BOEINGU:BA(P)U$13/06/19805.4632
BOEINGU:BA(P)U$16/06/19805.4447
BOEINGU:BA(P)U$17/06/19805.3706
UNITED TECHNOLOGIESU:UTX(P)U$28/05/19802.6562
UNITED TECHNOLOGIESU:UTX(P)U$29/05/19802.625
UNITED TECHNOLOGIESU:UTX(P)U$30/05/19802.6719
UNITED TECHNOLOGIESU:UTX(P)U$02/06/19802.7344
UNITED TECHNOLOGIESU:UTX(P)U$03/06/19802.7344
UNITED TECHNOLOGIESU:UTX(P)U$04/06/19802.7969
UNITED TECHNOLOGIESU:UTX(P)U$05/06/19802.7812
UNITED TECHNOLOGIESU:UTX(P)U$06/06/19802.7656
UNITED TECHNOLOGIESU:UTX(P)U$09/06/19802.7109
UNITED TECHNOLOGIESU:UTX(P)U$10/06/19802.6797
UNITED TECHNOLOGIESU:UTX(P)U$11/06/19802.7344
UNITED TECHNOLOGIESU:UTX(P)U$12/06/19802.6797
UNITED TECHNOLOGIESU:UTX(P)U$13/06/19802.7031
UNITED TECHNOLOGIESU:UTX(P)U$16/06/19802.7266
UNITED TECHNOLOGIESU:UTX(P)U$17/06/19802.7109

 

The excel A is added in the attachment.

thanks in advance.

best regards,

lipeng 

1 REPLY 1
Reeza
Super User
Read the first data set twice, once to get everything from row 2 down and the second time to get the first two rows only. Transpose both using PROC TRANSPOSE and then merge the results.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 414 views
  • 0 likes
  • 2 in conversation