|
Do you know what the correct industry is, ahead of time, or do you need to
calculate it on the fly?
If you need to calculate it on the fly then you shouuld do a PROC FREQ or
use PROC SQL to do a count, then sort the resulting dataset by the count,
and change the other rows in that frequency dataset to some other value;
then merge back onto the main dataset.
If you know it ahead of time, just check for the value, and modify it. No
reason to use arrays that I can think of.
-Joe
On Mon, Jul 20, 2009 at 7:01 AM, Jeli <jeli0703@hotmail.co.uk> wrote:
> I am building a super dataset based on 5 different datasets from
> around the business, appending them one on top of the other (the
> formats are identical)
>
> The problem arises when the same IDs have different critical
> information ie
>
> Dataset ID industry amount
> datasetA 1 banking £50
> datasetA 1 banking £50
> datasetA 1 banking £50
> datasetB 1 services £100
> datasetC 2 retail £10
>
> in this example they are all legitimate rows but ID 1 has shouldn’t
> have two different industries.
>
> What I am trying to achieve is to scan the dataset and identify where
> ID is the same and the industry is different and then rename the ID
> to 1a.
> Is there a way of using a scan function and an array??
>
|