Sorted SAS tables not merging -


i trying simple merge , getting error "by variables not sorted on data set work.gmby1"

they sorted, have sorted them , checked manually sorted.

variables of same size , format in each table.

a proc sql join not work either.

any clues on problem here?

thanks.

proc sort data=total_channels (where=(orders ne . , website_country='uk')) out=sorted_channels;  website_country year_order month_order channel; run;  proc sort data=gmby out=gmby1; website_country year_order month_order channel; website_country='uk'; run;  data gmby_merge; merge sorted_channels gmby1; website_country year_order month_order channel; run; 

log

error: variables not sorted on data set work.gmby1. website_country=uk year_order=2012 month_order=9 orders=. bookings=. gm=. channel=displayretargeting order_count=3 fo_gm_euro=22.605769157 yr1_gm_euro=67.88001442 cum_yr2=90.972795325 cum_yr3=108.83075505 cum_yr4=124.35002072 cum_yr5=138.15287302 fiscal_year=2013 fiscal_quarter=1 first.website_country=0 last.website_country=0 first.year_order=0 last.year_order=0 first.month_order=0 last.month_order=0 first.channel=1 last.channel=1 _error_=1 _n_=40 note: sas system stopped processing step because of errors. 

this due "channel" containing capitalised variable.

i had "drtv" , "direct type-in" , former being sorted before latter, since sas sorts capitals ahead of lowercase hence join fail. lowercased drtv.

i had no idea caps mattered! know.

thanks all.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -