Page 1 of 1

sort records and put Null if there are more matches on key

Posted: Fri Aug 21, 2009 9:04 am
by vsi
I have data like this

Location Timezone
1000 CST
1000 PST
1000 EST
1000
1100 IST
1100
1200
1300 GMT
1300 CST

My Output should look like

Location Timezone
1000
1100 IST
1200
1300

How Can I get this .....sort keychange is not helping

i.e if there are multiple timezones i need to keep null
else data

Posted: Fri Aug 21, 2009 9:08 am
by ArndW
I cannot understand your rules for getting from your input to your output. Could you perhaps explain what your are trying to achieve?

Re: sort records and put Null if there are more matches on k

Posted: Fri Aug 21, 2009 9:09 am
by ArndW
vsi wrote:I have data like this

Location Timezone
1000 CST
1000 PST
1000 EST
1000
1100 IST
1100
1200
1300 GMT
1300 CST

My Output should look like

Location Timezone
1000
1100 IST
1200
1300

How Can I get this .....sort keychange is not helping

i.e if there are multiple timezones i need to keep null
else data

Posted: Fri Aug 21, 2009 9:09 am
by chulett
Your example doesn't match your "i.e." written description. :?

Posted: Fri Aug 21, 2009 9:42 am
by vsi
iF THERE ARE multiple timezones on location
timezone should be null
if there is only one timezone ..Then I have to take the timezone as it is

if the location has a null timezone and a timezone . I have to take timezone

Posted: Fri Aug 21, 2009 10:08 am
by Sainath.Srinivasan
Use an aggregator to get the distinct timeZone count and set those with > 1 as NULL.

Re: sort records and put Null if there are more matches on k

Posted: Fri Sep 18, 2009 3:42 am
by RohitNara
what if
Location Timezone
1000 CST
1000 PST
1000 NULL
this kind of data occurs???

Re: sort records and put Null if there are more matches on k

Posted: Fri Sep 18, 2009 3:43 am
by RohitNara
what if
Location Timezone
1000 CST
1000 PST
1000 NULL
this kind of data occurs???

Posted: Sat Sep 19, 2009 2:29 am
by Sreenivasulu
'Null' is empty ie like a blackhole. You have mentioned 'null' as a word then you need to handle this record before this stage

Regards
Sreeni